-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.hs
More file actions
executable file
·28 lines (19 loc) · 768 Bytes
/
Main.hs
File metadata and controls
executable file
·28 lines (19 loc) · 768 Bytes
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
module Main (main) where
--------------------------------------------------------------------------------
import Control.Wire
import FRP.Netwire.Input
import qualified Graphics.UI.GLFW as GLFW
import qualified Lambency as L
import Linear.Vector
import TetrisAttack.Constants
import TetrisAttack.Game
import Prelude hiding (id, (.))
--------------------------------------------------------------------------------
camera :: L.ContWire a L.Camera
camera = L.mk2DCam screenSizeX screenSizeY . pure zero
tetrisAttack :: L.Game GameResult
tetrisAttack = L.Game camera [] ((id &&& quitWire) >>> game)
where
quitWire = (pure True . keyPressed GLFW.Key'Q) `L.withDefault` pure False
main :: IO ()
main = L.runOpenGL 768 576 "Tetris Attack" Running tetrisAttack