Inventory module¶
Class Inventory contains a set of objects belonging to a player and methods to manipulate and check them.
-
class
Inventory.
Inventory
[source]¶ Bases:
object
-
add_city
(city)[source]¶ Adds the passed city to the player inventory and removes the resources.
- Args:
- City
- Returns:
- None
-
add_dev_card
(dev_card)[source]¶ Adds the passed dev_card to the player inventory and removes the resources.
- Args:
- DevelopmentCard
- Returns:
- None
-
add_road
(road)[source]¶ Adds the passed road to the player inventory and removes the resources.
- Args:
- Road
- Returns:
- None
-
add_settlement
(settlement)[source]¶ Adds the passed settlement to the player inventory and removes the resources.
- Args:
- Settlement
- Returns:
- None
-
has_city
()[source]¶ Checks if the player has the resources to build a city.
- Args:
- None
- Returns:
- bool
-
has_dev_card
()[source]¶ Checks if the player has the resources to build a dev card.
- Args:
- None
- Returns:
- bool
-