Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import PIL.Image, PIL.ImageTk, PIL.ImageDraw, PIL.ImageFont
- import random, os, sys, threading, base64
- if getattr(sys, 'frozen', False):
- exe_path = os.path.dirname(sys.executable)
- elif __file__:
- exe_path = os.path.dirname(os.path.abspath(__file__))
- def no():
- pass
- class TKGUI:
- def __init__(self):
- self.root= Tk() ##initilise the main window
- self.quit = False ##defaults the quit flag
- self.choice = 0
- self.points = [0, 0, 0]
- self.icons = {}
- self.gen_icons()
- self.CPU_choice = None
- self.anim = True
- self.result = False
- self.result_choice = 0
- def create_icon(self, url, data, name, w=32, h=32):
- if os.path.isfile(url):
- im = PIL.Image.open(url)
- else:
- open(name+".gif",'wb').write(base64.b64decode(data))
- im = PIL.Image.open(url)
- im = im.resize((w, h), PIL.Image.ANTIALIAS)
- icon = PIL.ImageTk.PhotoImage(im)
- return icon
- def gen_icons(self):
- rock = "R0lGODlhEwJUA4ABAAAAAP///yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAAEALAAAAAATAlQDAAL+jI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1qt9yu9wsOi8fksvmMTqvX7Lb7DY/L5/S6/Y7P6/f8vv8PGCg4SFhoeIiYqDgG0OgIYAC5OEnJ9niJmYlZydlppQkaKuroWWoqNJqqCnra6iqzGiur+VprKzKbq7t52+sLsRss/Phb/DuMnCxpzOyp/KzcLJ0IXQ09jf1nvV2d7W3HHb79TW4pfj5eri6G3i6+Dp/lPn8ebw9Fn19/z3+k/7+vn0AfAAuiG4jwhsGFBxM6dMEwYsOHFE1IvBiwosb+Dhg7ZtwIkoLHkR9DmlxAMuW7kywRqHy5sqVJmDS5yQRZM2e6mw51+tzJk9/PodaCCiWK9JlReEmbKl36zanUaFCxTb2KrGozrFyHaT3WNWywr7bEmt1F9tXZtbnSmmILd5ZbTnHryp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vv/GqD/uzb+yuT/u3n+2yj/u7z+62z/u/f+vDAPzDb+upSPzHD+vGj/zLr/zLj/zN7/zDX4rRf/zQT/28P/3X//vEqP23n/3dj/vcD/7+r2+L4w/75W/+rA+M6X/+6M/+pL/+74/6ySj/p48K9T//9I//n4+H+w/6bkgA8DF1uf1hlJNWe3HWm3fvglAcydI80VRd2dZ9Yfab6dq+8Vzf+Sj+gUHhkAjsHZFJ5ZLZvBWhUemUKnJesVntloupfsFh8ahbNp/RadqY3Xb/1HH5nI5+3/F5cp3f9/9r9AQHxwANDxETEwgZG6MUISMl0xwrLeEmMzU3kS49P1U4RUdJOUBPUa1KV1lbFVJhP11naUVjby9rdXcTcX0deYOF6X6LB4eRk8uMmfOUn6GXmqfvoq2vcai127C7vTe2w8O+yct9xNGrzNfZD9Lfp9r+5cnh66Hm8a/t94Xy/Z/5BcT0jyAvgQdfFFRYC2HDFQshtnI4EUVEi6MoZixxkWMmjR9VdRSJCCTIkScNlTSJkmUdlStbxqT08qNMm2Zo1ry5U0tOnTyBMvH5M2jRHkOJGlX6BGnGpU+ZNqUIleoHqRqrZtVwFatWrxS4dv06FkTYqWTRLjDrNG1bA2vZukULN67cr3Tr2s2KN69eqnzP+q0KeKLgvYQdGv6LuLBipYwbOy4KObJknpQrW7aJObDmmJw7e0YJOrRokaT7mraIOrXqhayTui4Iu6RshbRf2vaHO6duebx9+l4HHKnwb8SbGseGXKryaMyvOlcGPaw3dGHUzVrfhX2t9lnc6XpnBR6veFLk+ZrnhB6weo/s07uPBJ+wfEX0EdtPiT+/fj/8IfOPjzwKAAA7"
- self.icons['rock'] = self.create_icon(exe_path+"\\rock.gif", rock, "rock", w=160, h=256)
- self.icons['paper'] = self.create_icon(exe_path+"\\paper.gif", paper, "paper", w=160, h=256)
- self.icons['scissors'] = self.create_icon(exe_path+"\\scissors.gif", scissors, "scissors", w=160, h=256)
- def rand_choice(self): ## keps setting a random number to choice as the computers choice
- while not self.quit:
- self.choice = random.randint(0, 2)
- def play(self, event, choice):
- if choice == 0:
- self.r.configure(command=no)
- self.p.configure(state="disabled")
- self.s.configure(state="disabled")
- elif choice == 1:
- self.r.configure(state="disabled")
- self.p.configure(command=no)
- self.s.configure(state="disabled")
- elif choice == 2:
- self.r.configure(state="disabled")
- self.p.configure(state="disabled")
- self.s.configure(command=no)
- self.player_choice = choice
- self.result = True
- def colourize(self):
- win = False
- if self.result_choice == 0: #rock
- if self.player_choice == 0:
- self.points[1] +=1
- self.r.configure(bg="green")
- self.CPU_choice.configure(bg="green")
- elif self.player_choice == 1:
- self.points[0] +=1
- self.p.configure(bg="green")
- self.CPU_choice.configure(bg="red")
- elif self.player_choice == 2:
- self.points[2] +=1
- self.s.configure(bg="red")
- self.CPU_choice.configure(bg="green")
- elif self.result_choice == 1: # paper
- if self.player_choice == 0:
- self.points[2] +=1
- self.r.configure(bg="red")
- self.CPU_choice.configure(bg="green")
- elif self.player_choice == 1:
- self.points[1] +=1
- self.p.configure(bg="green")
- self.CPU_choice.configure(bg="green")
- elif self.player_choice == 2:
- self.points[0] +=1
- self.s.configure(bg="green")
- self.CPU_choice.configure(bg="red")
- elif self.result_choice == 2: # scissors
- if self.player_choice == 0:
- self.points[2] +=1
- self.r.configure(bg="red")
- self.CPU_choice.configure(bg="green")
- elif self.player_choice == 1:
- self.points[0] +=1
- self.p.configure(bg="green")
- self.CPU_choice.configure(bg="red")
- elif self.player_choice == 2:
- self.points[1] +=1
- self.s.configure(bg="green")
- self.CPU_choice.configure(bg="green")
- def reset(self):
- children = self.root.winfo_children()
- for child in children:
- child.pack_forget()
- child.destroy()
- self.CPU_choice = None
- self.anim = True
- self.result = False
- self.result_choice = 0
- self.root.configure(bg="white")
- self.interface()
- def interface(self):
- holder = Frame(self.root, bg="white")
- holder.pack(fill=BOTH, expand=1)
- CPU = Frame(holder, bg="white")
- CPU.pack(side=TOP, fill=X, expand=1)
- self.CPU_choice = Label(CPU, image=self.icons['rock'], bg="white")
- self.CPU_choice.pack(side=TOP)
- Score = Frame(holder, bg="white")
- Score.pack(side=TOP, fill=X)
- self.win = Label(Score, text="Won: %s" %self.points[0], bg="white")
- self.win.pack(side=LEFT)
- self.draw = Label(Score, text="Draw: %s" %self.points[1], bg="white")
- self.draw.pack(side=LEFT)
- self.loose = Label(Score, text="Loss: %s" %self.points[2], bg="white")
- self.loose.pack(side=LEFT)
- Player = Frame(holder, bg="white")
- Player.pack(side=TOP, fill=X, expand=1)
- Frame(Player).pack(side=LEFT,fill=X, expand=1)
- self.r = Button(Player, bg="white", image=self.icons['rock'], command=lambda e=Event(), c=0:self.play(e,c))
- self.r.pack(side=LEFT)
- self.p = Button(Player, bg="white", image=self.icons['paper'], command=lambda e=Event(), c=1:self.play(e,c))
- self.p.pack(side=LEFT)
- self.s = Button(Player, bg="white", image=self.icons['scissors'], command=lambda e=Event(), c=2:self.play(e,c))
- self.s.pack(side=LEFT)
- Frame(Player).pack(side=LEFT, fill=X, expand=1)
- def run(self): ##main part of the application
- self.root.configure(bg="white") #sets the background to white rather than default gray.
- self.root.protocol("WM_DELETE_WINDOW", self.quitting) ##changes the X (close) Button to run a function instead.
- try:
- self.root.iconbitmap("fav.ico") ##sets the application Icon
- except:
- pass
- self.root.title("MyApp")
- self.root.geometry("800x600")
- self.root.configure(bg="white")
- t = threading.Thread(target=self.rand_choice)
- t.start()
- self.interface()
- x = 0
- r = 0
- reset = 0
- opt = ["rock", "paper", "scissors"]
- #############################################################
- while not self.quit: ##flag to quit the application
- self.root.update_idletasks() #updates the root. same as root.mainloop() but safer and interruptable
- self.root.update() #same as above. This lest you stop the loop or add things to the loop.
- #add extra functions here if you need them to run with the loop#
- if self.CPU_choice != None and self.anim and not self.result:
- if x > 10:
- x= 0
- self.CPU_choice.configure(image=self.icons[opt[self.choice]])
- self.CPU_choice.update()
- else:
- x += 1
- if self.result:
- if r < 10:
- self.CPU_choice.configure(image=self.icons[opt[self.choice]])
- self.CPU_choice.update()
- r+=1
- else:
- r = 0
- self.result_choice = self.choice
- self.CPU_choice.configure(image=self.icons[opt[self.result_choice]])
- self.CPU_choice.update()
- self.result = False
- self.anim = False
- if not self.anim and not self.result:
- if reset == 0:
- self.colourize()
- reset +=1
- if reset > 100:
- reset = 0
- self.reset()
- def quitting(self): ##to set the quit flag
- self.quit = True
- if __name__ == "__main__":
- app = TKGUI() ##creates instance of GUI class
- try:
- app.run()# starts the application
- except KeyboardInterrupt:
- app.quitting() ##safely quits the application when crtl+C is pressed
- except:
- raise #you can change this to be your own error handler if needed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement