I’m working on a clicker game in Tkinter that is very different from Bubble Blaster:
from tkinter import * from tkinter.messagebox import * from time import sleep import math extraCashCost = 50 class AppUI(Frame): def __init__(self, master=None): self.saves = open("self.saves.log", "r") self.savesEdit = open("self.saves.log", "a") self.saveSring = ''.join(self.saves.read()) Frame.__init__(self, master, relief=SUNKEN, bd=2) self.menubar = Menu(self) menu = Menu(self.menubar, tearoff=0) self.menubar.add_cascade(label="Game", menu=menu) menu.add_command(label="Open Store", command=lambda:storewin()) menu.add_command(label="Browse Saves", command=lambda:showinfo("WIP", "This is a work in progress game")) menu = Menu(self.menubar, tearoff=0) self.menubar.add_cascade(label="Edit", menu=menu) menu.add_command(label="Open the developer window", command=lambda:devwin()) try: self.master.config(menu=self.menubar) except AttributeError: # master is a toplevel window (Python 1.4/Tkinter 1.63) self.master.tk.call(master, "config", "-menu", self.menubar) self.money = 0 self.cashGet = 1 self.moneyShow = Label(root, text="$ " + str(self.money)) self.moneyGet = Button(root, text="Get Money!", command=lambda:cashin(self.cashGet)) self.moneyGet.pack(side=BOTTOM) self.moneyShow.pack() def cashin(cash): sleep(0.125) app.money += int(cash) app.moneyShow.config(text="$ " + str(app.money)) def devcashadd(moneyz): app.money += int(moneyz) app.moneyShow.config(text="$ " + str(app.money)) def devwin(): dev = Tk() dl = Label(dev, text="Welcome to the developer window. \n Here you will have access to developer tools. \n This is available only in developer versions.").pack() mcl = Label(dev, text="Enter a number below and press the button under it to get free money!") mc = Entry(dev) mca = Button(dev, text="Get Money", command=lambda:devcashadd(mc.get())).pack() mc.pack() dev.mainloop() def ec(cs): global extraCashCost if app.money >= extraCashCost: extraCashCost = math.ceil(extraCashCost * 2.2) app.money -= extraCashCost app.cashGet *= 1.6 app.moneyShow.config(text="$ " + str(app.money)) cs.config(text="$ " + str(extraCashCost)) def storewin(): global extraCashCost store = Tk() extraCashShow = Label(store, text="$ " + str(extraCashCost)) extraCash = Button(store, text="More Money!", command=lambda:ec(extraCashShow)) extraCashShow.pack() extraCash.pack() store.mainloop() root = Tk() app = AppUI(root) app.pack() root.mainloop()
It is going to be on GitHub soon. Any advice concerning the code?
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!