-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
87 lines (58 loc) · 3.01 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from classes import Game, BotBattlefield, DinoBattlefield
if __name__ == '__main__':
the_game = Game()
race_choice = the_game.start()
if the_game.player_race == "Dinos":
players_army = the_game.assemble_army(race_choice)
enemies_army = the_game.assemble_enemies(race_choice)
battlefield = DinoBattlefield()
area = battlefield.area1
battlefield.begin_dino_journey(area)
rounds = the_game.rounds
the_game.battle_start_for_dinosaurs(rounds, players_army, enemies_army)
print("Good Game")
elif the_game.player_race == "Robots":
players_army = the_game.assemble_army(race_choice)
enemies_army = the_game.assemble_enemies(race_choice)
battlefield = BotBattlefield()
area = battlefield.area1
while area == battlefield.area1 or area == battlefield.area1a or area == battlefield.area2 or area == battlefield.area2a:
if area == battlefield.area1:
area = battlefield.begin_journey(area, players_army)
if area == battlefield.area1a:
area = battlefield.begin_journey(area, players_army)
if area == battlefield.area2:
area = battlefield.begin_journey2(area, players_army)
if area == battlefield.area2a:
area = battlefield.begin_journey2(area, players_army)
if area == battlefield.area3:
break
area = battlefield.begin_journey3(area, players_army)
rounds = the_game.rounds
next_move = [False, battlefield.area3]
while not the_game.end and players_army.race == "Robots":
next_move = the_game.battle_start(rounds, players_army, enemies_army)
if next_move == [False, battlefield.area2b]:
area = battlefield.area2b
if next_move == True:
the_game.end = next_move
break
while area == battlefield.area1 or area == battlefield.area1a or area == battlefield.area2 or area == battlefield.area2a or next_move[1] == battlefield.area2b or area == battlefield.area_end:
if area == battlefield.area1:
area = battlefield.begin_journey(area, players_army)
if area == battlefield.area1a:
area = battlefield.begin_journey(area, players_army)
if area == battlefield.area2:
area = battlefield.begin_journey2(area, players_army)
if area == battlefield.area2a:
area = battlefield.begin_journey2(area, players_army)
if area == battlefield.area2b:
area = battlefield.begin_journey2(area, players_army)
if area == battlefield.area3:
area = battlefield.begin_journey3(area, players_army)
if area == "battle":
break
if area == battlefield.area_end:
the_game.end = True
break
print("GOOD GAME")