IRON  1.0
Public Member Functions | Private Attributes | List of all members
iron.placeable.Placeable Class Reference
Inheritance diagram for iron.placeable.Placeable:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, PlacementTile|None tile)
 
None place (self, Tile tile)
 
PlacementTile|None tile (self)
 

Private Attributes

 _tile
 

Detailed Description

Placeable is a base class of an object that might be Placed by a Placer.

Constructor & Destructor Documentation

◆ __init__()

def iron.placeable.Placeable.__init__ (   self,
PlacementTile | None  tile 
)
Initialize a Placeable object.

Args:
    tile (PlacementTile): A placeable object has a tile. This may be None during construction.

Member Function Documentation

◆ place()

None iron.placeable.Placeable.place (   self,
Tile  tile 
)
Place the object by assigning the object to a Tile.

Args:
    tile (Tile): The placement tile.

Raises:
    AlreadyPlacedError: If the object's tile is already set to a Tile object.

Reimplemented in iron.worker.Worker.

◆ tile()

PlacementTile | None iron.placeable.Placeable.tile (   self)
Return the tile of the placeable object.

Returns:
    PlacementTile: The current placement of the object.

Member Data Documentation

◆ _tile

iron.placeable.Placeable._tile
private

The documentation for this class was generated from the following file: