Building

class src.building.Building(owner, node)[source]

Abstract class template for building types controls behaviour or settlements and builidngs

Parameters:
  • owner (str) – player that owns current building

  • node (int) – which node the building has been constructed on

  • cost (list) – cost of resources required to construct the building

asset()[source]

Retrieves corresponding image files for either a city or settlement

Raises:

NotImplementedError – If a type of building

besides a city or settlement is attempted to be built

build(resources)[source]

Builds a specific type of building, either city or settlement

Parameters:

resources (list) – Player’s current resource inventory to construct a building

class src.building.City(owner, node)[source]

Inherits behaviour from abstract base class building

Parameters:
  • owner (str) – player that owns current building

  • node (int) – which node the building has been constructed on

  • cost (list) – cost of resources required to construct the building

class src.building.Settlement(owner, node)[source]

Inherits behaviour from abstract base class building

Parameters:
  • owner (str) – player that owns current building

  • node (int) – which node the building has been constructed on

  • cost (list) – cost of resources required to construct the building