-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhayday.py
66 lines (52 loc) · 2.34 KB
/
hayday.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
from board import Board
from trees import Trees
from crops import Crops
from stations import Stations
from pens import Pens
# from shop import Shop
from tasks import Tasklist
from adb import Adb_Device, ShowOutput
from tkinter import Tk, Frame
from gui import Buttons, Output, TaskListFrame, OrdersFrame, StationFrame
from threading import Thread
class MainApp(Tk):
def __init__(self):
self.root = Tk.__init__(self)
self.device=Adb_Device()
self.tl=Tasklist()
self.buttons=Buttons(self, start=self.tl.start, pause= self.tl.hold, stop=self.tl.stop, capture=self.device.printScreen)
self.buttons.grid(row=2,column=1)
self.tasks=TaskListFrame(self, self.tl.getTaskList)
self.tasks.grid(row=3, column=1, sticky='n')
self.orders=OrdersFrame(self, self.tl.getWishList)
self.orders.grid(row=3, column=2, sticky='n')
self.stations=Stations(self.device, self.tl)
self.stationFrame=StationFrame(self, self.stations.getList)
self.stationFrame.grid(row=3, column=3, sticky='n')
# self.shop=Shop(self.device, self.tl)
self.trees=Trees(self.device, self.tl)
self.crops=Crops(self.device, self.tl)
self.pens=Pens(self.device, self.tl)
self.board=Board(self.device, self.tl)
# self.output=Output(self)
# self.output.grid(row=1, column=1)
# self.shop.add('egg', min_amount=2, sell=True)
# self.shop.add('milk', min_amount=2, sell=True)
# self.shop.add('bacon', min_amount=2, sell=False)
# self.shop.add('wool', min_amount=2, sell=False)
# self.shop.add('wheat', min_amount=2, sell=False)
# self.shop.add('corn', min_amount=2, sell=False)
# self.shop.add('soy', min_amount=2, sell=False)
# self.shop.add('carrot', min_amount=2, sell=False)
# self.shop.add('sugarcane', min_amount=2, sell=False)
# self.shop.add('pumpkin', min_amount=2, sell=False)
# self.shop.add('indigo', min_amount=2, sell=False)
# self.shop.add('cotton', min_amount=2, sell=False)
# self.shop.add('bread', min_amount=2, sell=False)
# self.shop.add('corn bread', min_amount=2, sell=False)
# self.shop.add('cookie', min_amount=2, sell=False)
def start(self):
self.tl.start()
if __name__ == "__main__":
app = MainApp()
app.mainloop()