-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (26 loc) · 901 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from random import randint
from battle import Battle
from models.army import Army
if __name__ == '__main__':
armies = []
try:
calc_army = int(
input('Enter how many armies are playing (min = 2): \n')
)
if calc_army < 2:
print('You entered less then 2 armies')
else:
for i in range(calc_army):
calc_squad = int(
input(
'Enter how many squads for Army_{0} (min = 1):\n'.format(i))
)
army = Army(randint(2, calc_squad), i)
army.create_army()
army.damage_rank()
armies.append(army)
Game = Battle(armies)
Game.battle_armies()
print(Game)
except ValueError:
print('Wrong input, you must input only number')