]>
Commit | Line | Data |
---|---|---|
c4557abd VD |
1 | import creatures |
2 | import buildings | |
3 | ||
4 | class GameSession: | |
5 | def __init__(self, wizard_name): | |
6 | self.left_hand = creatures.Adept(wizard_name) | |
7 | self.minions = [creatures.Minion() for i in range(5)] | |
8 | self.battleground = buildings.Battleground() | |
9 | self.tower = buildings.Tower() | |
10 | self.tower_upgrades = { | |
11 | "Build a Workshop": [self.tower.build_section, buildings.Workshop], | |
12 | "Build an Amory": [self.tower.build_section, buildings.Armory], | |
13 | "Extend the Storage": [self.tower.build_section, buildings.Storage], | |
14 | "Build next level": [self.tower.build_level] | |
15 | } | |
16 | ||
17 | self.minion_distribution = { | |
18 | "Dig up corpses": self.battleground.dig_corpses_up, | |
19 | "Bring corpses home": self.battleground, | |
20 | "Sacrifice minions": self.left_hand.summon | |
21 | } | |
22 | ||
23 | def do_turn(self, minion_distribution: dict(str, list(creatures.Minion)), tower_action): | |
24 | for work in self.minion_distribution: | |
25 | workers = minion_distribution.get(work, []) | |
26 | self.minion_distribution[work](workers) |