-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpokermachine.py
73 lines (53 loc) · 1.64 KB
/
pokermachine.py
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 06 2020
@author: simslay
"""
import time
from tkinter import *
from gui.start_page import StartPage
def main():
def play(game):
state = game.state
game.act_one()
# game_info_q.put(game)
# state.display_players()
# if not state.round_ended:
# state.deal_flop()
# state.print_round_info()
# print()
# if not state.round_ended:
# state.ask_players()
# game_info_q.put(game)
# state.print_round_info()
# print()
state.round_ended = True
state.end_round()
game.init_game()
class App(Tk):
def __init__(self, *args, **kwargs):
Tk.__init__(self, *args, **kwargs)
container = Frame(self)
container.pack(side="top", fill="both", expand=True)
container.grid_rowconfigure(0, weight=1)
container.grid_columnconfigure(0, weight=1)
self.frames = {}
list_of_frames = [StartPage]
for F in list_of_frames:
frame = F(container, self)
self.frames[F] = frame
frame.grid(row=0, column=0, sticky="nsew")
self.fresh = True
self.show_frame(StartPage)
def show_frame(self, context):
frame = self.frames[context]
print("Waiting")
if not self.fresh:
time.sleep(0.1)
# frame.update_frame(game_info_q.get())
self.fresh = False
frame.tkraise()
app = App()
app.mainloop()
if __name__ == "__main__":
main()