Football4 Docs
Fall 2024
API

# o1.football4

package o1.football4

## Members list

### Packages

package o1.football4.gui

### Type members

#### Classlikes

class Club(val `name`: String, val `abbreviation`: String, val `stadium`: String)

The class `Club` represents football clubs in a match statistics system. Only some very basic information for each club is recorded. A club object is immutable once created.

The class `Club` represents football clubs in a match statistics system. Only some very basic information for each club is recorded. A club object is immutable once created.

## Parameters

name

  the name of the club

stadium

  the name of the home stadium of the club

## Attributes

Supertypes
  class Object
  trait Matchable
  class Any

class Match(val `home`: Club, val `away`: Club, val `homeScorers`: Vector[Player], val `awayScorers`: Vector[Player])

Each object of the class `Match` represents a state of a football match. A match is played between teams from two clubs: a home club and an away club. Goals scored by players of either team can be added to the match object with the method `addGoal`, which produces a new `Match` object representing the updated state of the match. Each `Match` object is immutable.

Each object of the class `Match` represents a state of a football match. A match is played between teams from two clubs: a home club and an away club. Goals scored by players of either team can be added to the match object with the method `addGoal`, which produces a new `Match` object representing the updated state of the match. Each `Match` object is immutable.

## Parameters

away

  the club whose team plays away in the match

awayScorers

  the players who have scored goals for the away team so far (in order for each goal; the same player appears multiple times if they have scored multiple goals)

home

  the club whose team plays at home in the match

homeScorers

  the players who have scored goals for the home team so far (in order for each goal; the same player appears multiple times if they have scored multiple goals)

## Attributes

Supertypes
  class Object
  trait Matchable
  class Any

class Player(val `name`: String, val `employer`: Club)

The class `Player` represents football players in a match statistics program. Only some very basic information about each player is recorded.

The class `Player` represents football players in a match statistics program. Only some very basic information about each player is recorded.

A player object is immutable after creation.

## Parameters

employer

  the club the player plays for

name

  the name of the player

## Attributes

Supertypes
  class Object
  trait Matchable
  class Any

class Season

The class `Season` represents a season in a football league, that is, a series of matches between various clubs. The methods in the class allow adding matches to a season as well as calculating some very basic season statistics (the total number of matches, the biggest win during the season, etc.).

The class `Season` represents a season in a football league, that is, a series of matches between various clubs. The methods in the class allow adding matches to a season as well as calculating some very basic season statistics (the total number of matches, the biggest win during the season, etc.).

## Attributes

Supertypes
  class Object
  trait Matchable
  class Any