Road Module

class Road.Road(from_door, to_door)[source]

Bases: object

Road from door to door. Once instantiated, it is filled with Tile.

get_tile(x, y)[source]

Get a tile from Road.

Parameters:
  • x – potision x.
  • y – potision y.
Return type:

Tile class.

Returns:

Return tile. if it does not exist, return None.

get_tiles()[source]

Get all tiles from Road.

Return type:List of Tile .
Returns:Return tiles. if it does not exist, return empty list.
may_have_tile(x, y)[source]

Whether there is a possibility of holding the tile.

Parameters:
  • x – potision x.
  • y – potision y.
Return type:

Booean

Returns:

Return True, if there is a possibility. Otherwise Fasle.

set_tile(x, y, new_tile)[source]

Set a tile to Road.

Parameters:
  • x – potision x.
  • y – potision y.
  • new_tile – new Tile

Previous topic

Rect Module

Next topic

Roads Module

This Page