Answers for "how to make base attack force factory in python"

1

how to make base attack force factory in python

import os
import time
aluminium = 0
steel = 0
concrete = 0
level = 1
while True:
    if level == 1:
        aluminium += 100
        steel += 200
        concrete += 500
        
    elif level == 2 :
        aluminium += 500
        steel += 400
        concrete += 800
        
    elif level == 3:
        aluminium += 700
        steel += 600
        concrete += 1000
        
    elif level == 4:
        aluminium += 900
        steel += 600
        concrete += 1200 
        
    if aluminium >= 5000 and level == 1:
        aluminium = 5000
        print("storage for aluminium has exeeded")
        
    if steel >= 6000 and level == 1:
        steel = 6000
        print("storage for steel has exeeded")

    if concrete >= 5000 and level == 1:
        concrete = 5000
        print("storage for concreet has exeeded")
    if aluminium == 5000 and steel == 6000 and concrete == 5000 and level == 1:
        upgrade_leval = input("Do you wnat to goto leval 2 y/n:- ")
        if upgrade_leval == "y":
            level = 2
            aluminium -= 4000
            steel -= 5000
            concrete -= 5000
        else:
            print("ok but storage is exeeded")
    print("Your resorses are :- ")
    print("aluminium:- ", aluminium , " steel:- ", steel ," concrete:- ",concrete)
     
    time.sleep(3)
    os.system("cls")
#you can make this game factories further
Posted by: Guest on September-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language