-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.py
More file actions
44 lines (37 loc) · 1.28 KB
/
init.py
File metadata and controls
44 lines (37 loc) · 1.28 KB
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
from tkinter import *
from tkinter import messagebox
from Player import Player
from PlayerKiller import PlayerKiller
from Playermanager import Playermanager
def iDied():
if Playermanager.numberDeadPlayers <= 3:
messagebox.showinfo("", "its all good. ull get your LP back, king <3")
frame.quit()
quit()
else:
messagebox.showinfo("", "Top 4 = LP go up :)")
frame.quit()
quit()
def issaFirst():
messagebox.showinfo("","ISSA FIRST, LETS GOOOOO!!!")
quit()
if __name__ == "__main__":
#Sets up window and shit
frame = Tk()
frame.title("TFTracker")
resetButton = Button(frame, text="Reset", command = Playermanager.reset)
iDiedButton = Button(frame, text="I died.", command = iDied)
playerLabel = Label(frame, text="Players:")
resetButton.grid(row=0, column=0)
iDiedButton.grid(row=0, column=1)
playerLabel.grid(row=1, column=0)
#Adds players and playerkillers to the gui
for i in range(7):
pname = f"Player {i+1}"
p = Player(pname, text=pname, width=12)
pk = PlayerKiller(p, text=f"{pname} died.", width=12)
Playermanager.addPlayer(p)
p.grid(row=i+2, column=0)
Playermanager.playerKillerSet.add(pk)
pk.grid(row=i+2, column=1)
frame.mainloop()