Documentation ¶ Overview ¶ Package player controls the game for each player Index ¶ type Config func (cfg Config) New(b *board.Board) (*Player, error) type Player Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { // WinPoints are the amount of points a player gets if they win a game. // A player's win points are decremented each time he attempts to unsuccessfully finish/win a game. WinPoints int } Config can be used to create new players. func (Config) New ¶ func (cfg Config) New(b *board.Board) (*Player, error) New creates a player with the winPoints defined by config and a board to modify. type Player ¶ type Player struct { WinPoints int Board *board.Board } Player stores the board and other player-specific data for each player in the game. Source Files ¶ View all Source files player.go Click to show internal directories. Click to hide internal directories.