-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.py
89 lines (75 loc) · 2.44 KB
/
Menu.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import Stats
import Create
from time import sleep
import mission
from Save_Load import save
import TimeClock
def menu():
print(f"###############\n"
f"# TIME: {Stats.Time}:00 ##\n"
f"###############"
f"\n\nMoney:${Stats.resorces.money} Rations: {Stats.resorces.rations} Med-Kits: {Stats.resorces.med_kit}\n "
f"S:{Stats.Unit_Soldiers.amount} H:{Stats.Unit_Heavy.amount} T:{Stats.Unit_Tanks.amount}\n"
f"--------------------------------------")
print(f"1. Create 2. Missions 3. Hires \n4. Shop 0. Exit 9. Play\nS. Save\n"
"--------------------------------------")
Select = input()
print(Select)
#EXIT
if Select == "0":
print("Exit")
Stats.Game = False
#TRAIN SOLDIERS,HEAVY,& TANKS
elif Select == "1":
Create.Train()
#MISSIONS
elif Select == "2":
mission.Missions()
#HIRE
elif Select == "3":
print("Hires: ")
if not Stats.Drill_Sargent:
print(f" 1. Drill_Sargent (${Stats.Drill_Sargent_Cost})")
Select = input()
if Select == "1":
if Stats.resorces.money >= Stats.Drill_Sargent_Cost:
Stats.resorces.money -= Stats.Drill_Sargent_Cost
Stats.Drill_Sargent = True
print("Bought Drill_Sargent!")
else:
print("Not enough Money")
else:
print("Drill Sargent already bought")
#Shop
elif Select == "4":
Create.shop()
elif Select == "9":
print("Pass Time: ")
amount = input()
try:
x = int(amount)
while x > 0:
x -= 1
TimeClock.Clock()
sleep(1)
#Soldier
if Stats.Unit_Soldiers.process_amount > 0:
Stats.Unit_Soldiers.process()
#Heavy Unit
if Stats.Unit_Heavy.process_amount > 0:
Stats.Unit_Heavy.process()
#Tanks
if Stats.Unit_Tanks.process_amount > 0:
Stats.Unit_Tanks.process()
#Mission
if Stats.resorces.in_mission:
Stats.Evacuate.in_mission()
except:
print("Try an actual number")
#Save
elif Select == "s":
try:
save()
print("Saved")
except:
print("Saved Failed!")