Board module

This class is an amalgamation of tiles, edges and vertices to represent the board. Don’t ask how it works, no one knows.

class Board.Board[source]

Bases: object

add_edges()[source]

Adds edges to all the tiles and sets up tiles to share edges that they should.

Args:
None
Returns:
None
add_vertices()[source]

Adds vertices to all the tiles that are correctly shared by neighboring tiles.

Args:
None
Returns:
None
connect_edges_to_edges()[source]

Points edges as their neighboring edges for simpler implementation of longest road calculations and more.

Args:
None
Returns:
None
connect_tiles()[source]

Creates a catan-structured graph from self.tile_array by connecting tiles to tiles.

Args:
None
Returns:
None
connect_vertices_to_vertices()[source]

Points vertices at neighboring vertices for simpler calculations of invalid vertices and more.

Args:
None
Returns:
None
is_valid_coordinate(x, y)[source]

Returns true if a tile coord, (x, y), is within range, false if not.

Args:
int, int
Returns:
bool