GameState module

This class is the GameState class. It contains the information that represents the current state of the Settlers of Definitely Not Katan game.

class GameState.GameState(player_array)[source]

Bases: object

add_invalid_vertices_to_build(vertex)[source]

The Game_State uses this method to add a set of invalid vertices to the invalid vertices array.

Args:
vertex (Vertex): The vertex used to find the set of invalid vertices to add to the invalid_vertices_to_build_array.
Returns:
None
has_connected_road(vertex)[source]

This checks if the passed vertex has a neighbor edge with a road owner by self.current_player.

Args:
Vertex
Returns:
bool
initial_setup()[source]

This method sets the tile types and values for the default setup.

Args:
None.
Returns:
None.
not_on_opp_sett(edge)[source]

This checks if the passed edge is neighboring a vertex with an opponent build settlement.

Args:
Edge
Returns:
bool
road_has_connected_road(edge)[source]

This checks if the edge passed has a neighboring edge with a road owned by self.current_player.

Args:
Edge
Returns:
None
vertex_check(vertex)[source]

The Game_State uses this method to check whether or not the vertex passed exists in the invalid_vertices_to_build_array.

Args:
vertex (Vertex): The vertex passed to check
Returns:
bool: if the vertex is in the invalid_vertices_to_build_array, returns False; else True.