battleman.py: Factored next round code into a separate function
This commit is contained in:
parent
e6e22d775c
commit
84f66955a7
11
battleman.py
11
battleman.py
|
@ -274,13 +274,20 @@ class Battle():
|
|||
|
||||
if self.current >= len(self.groups):
|
||||
self.current = 0
|
||||
self.round += 1
|
||||
print('Beginning round {}'.format(self.round))
|
||||
self.next_round()
|
||||
|
||||
g = self.get_current_group()
|
||||
g.begin_turn()
|
||||
|
||||
|
||||
def next_round(self):
|
||||
if self.round == None:
|
||||
self.round = 1
|
||||
else:
|
||||
self.round += 1
|
||||
print('Beginning round {}'.format(self.round))
|
||||
|
||||
|
||||
def deal_damage(self, index, amount):
|
||||
c = self.combatant_hash[index]
|
||||
c.damage(amount)
|
||||
|
|
Loading…
Reference in New Issue
Block a user