Tile

class Tile(coord: Coordinate)

Bases: object

A generic tile.

Has a location on a 2D grid, represented by a Coordinate.

Parameters:

coord – The location of the tile, as a Coordinate

classmethod fromRawInt(x: int, y: int) Tile

Create a PathTile from raw integers.

Parameters:
  • xx coordinate of the tile

  • yy coordinate of the tile

Returns:

A new tile

set_coords(x: int, y: int) None
set_coords(coords: tuple[int, int]) None
set_coords(coords: Coordinate) None

Set the tile’s coordinates.

property coords: tuple[int, int]

The x, y coordinates of this Tile.

property x: int

The x coordinate of this Tile.

property y: int

The y coordinate of this Tile.