-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLetterTrekApp.py
45 lines (31 loc) · 1.23 KB
/
LetterTrekApp.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
import time
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.graphics import Color
from kivy.animation import Animation
from kivy.core.window import Window
from kivy.clock import Clock
from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition
from ui.TileWidget import TileWidget
from ui.BoardScreen import BoardScreen
from ui.HomeScreen import HomeScreen
from ui.ChallengeCompletedScreen import ChallengeCompletedScreen
from ui.StartButtonWidget import StartButtonWidget
from ui.ImageButton import ImageButton
from kivy.properties import StringProperty, ObjectProperty
from core.GameEngine import GameEngine
from core.GameState import GameState
class LetterTrekApp(App):
status = StringProperty()
game_engine = ObjectProperty()
game_state = ObjectProperty()
def build(self):
self.title = 'Letter Trek'
self.game_engine = GameEngine()
sm = ScreenManager(transition=FadeTransition())
sm.add_widget(HomeScreen(name='home'))
sm.add_widget(BoardScreen(name='board'))
sm.add_widget(ChallengeCompletedScreen(name="challenge_completed"))
return sm