-
Notifications
You must be signed in to change notification settings - Fork 0
/
Solitaire.py
25 lines (18 loc) · 990 Bytes
/
Solitaire.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
# Our imports
import math
from Interstitial import *
from MainMenu import MainMenuState
from Raspigame import RaspberryPiGame
from SolitaireGame import PlayGameState
"""----------------------------------------------------------------------------------------------------
Application Entry Point Main entry point to the application. Sets up the objects and starts the main loop.
----------------------------------------------------------------------------------------------------
"""
solitaireGame = RaspberryPiGame("Solitaire", 800, 600)
mainMenuState = MainMenuState(solitaireGame)
endState = InterstitialState(solitaireGame, 'Congratulations!!!', math.inf, mainMenuState)
failState = InterstitialState(solitaireGame, "Try Again!", math.inf, mainMenuState)
playGameState = PlayGameState(solitaireGame, endState, failState)
getReadyState = InterstitialState(solitaireGame, 'Get Ready#!', 2000, playGameState)
mainMenuState.setPlayState(getReadyState)
solitaireGame.run(mainMenuState)