how to make base attack force factory in python

Solutions on MaxInterview for how to make base attack force factory in python by the best coders in the world

showing results for - "how to make base attack force factory in python"
Alma
10 Sep 2017
1
2import os
3import time
4aluminium = 0
5steel = 0
6concrete = 0
7level = 1
8while True:
9    if level == 1:
10        aluminium += 100
11        steel += 200
12        concrete += 500
13        
14    elif level == 2 :
15        aluminium += 500
16        steel += 400
17        concrete += 800
18        
19    elif level == 3:
20        aluminium += 700
21        steel += 600
22        concrete += 1000
23        
24    elif level == 4:
25        aluminium += 900
26        steel += 600
27        concrete += 1200 
28        
29    if aluminium >= 5000 and level == 1:
30        aluminium = 5000
31        print("storage for aluminium has exeeded")
32        
33    if steel >= 6000 and level == 1:
34        steel = 6000
35        print("storage for steel has exeeded")
36
37    if concrete >= 5000 and level == 1:
38        concrete = 5000
39        print("storage for concreet has exeeded")
40    if aluminium == 5000 and steel == 6000 and concrete == 5000 and level == 1:
41        upgrade_leval = input("Do you wnat to goto leval 2 y/n:- ")
42        if upgrade_leval == "y":
43            level = 2
44            aluminium -= 4000
45            steel -= 5000
46            concrete -= 5000
47        else:
48            print("ok but storage is exeeded")
49    print("Your resorses are :- ")
50    print("aluminium:- ", aluminium , " steel:- ", steel ," concrete:- ",concrete)
51     
52    time.sleep(3)
53    os.system("cls")
54#you can make this game factories further