Player module

Class Player contains all the objects that belong to the Player and all the methods that the Player can execute.

The Player has an inventory, a color, a name and turn variable which the Game accesses to give the player permission to act on the GameBoard.

The player can place a road, place a settlement, upgrade a settlement and roll the dice.

class Player.Player(netid, color, name)[source]

Bases: object

longest_road()[source]

Finds the length of the player’s longest road.

Args:
None
Returns:
int
road_length(road, visited_roads)[source]

Finds the longest road that can be made by following the passed road segment.

Args:
Road, [Road] (initially [])
Returns:
int