summaryrefslogtreecommitdiffstats
path: root/src/HTanks.hs
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-04-11 01:48:55 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-04-11 01:48:55 +0200
commitb694c7705eab500bd2d0b28b09b04e22c223c571 (patch)
tree4024fdb2860e5aa5de4e77850da4daa60499cbeb /src/HTanks.hs
parentd2be8eb4103f266eb2078135960779bcbb82c492 (diff)
downloadhtanks-b694c7705eab500bd2d0b28b09b04e22c223c571.tar
htanks-b694c7705eab500bd2d0b28b09b04e22c223c571.zip
Removed IO from Game monad
Diffstat (limited to 'src/HTanks.hs')
-rw-r--r--src/HTanks.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/HTanks.hs b/src/HTanks.hs
index 2fcdb66..5a8bdec 100644
--- a/src/HTanks.hs
+++ b/src/HTanks.hs
@@ -32,16 +32,16 @@ main = do
when (initialized gl) $ do
currentTime <- getCurrentTime
- let mainState = MainState {run = True, driver = SomeDriver gl, time = currentTime, players =
+ let gamestate = GameState {level = theLevel, tanks = [ Tank 5.0 5.0 0 0 1.5 270 False 3 1 5 1
+ , Tank 5.0 3.5 0 0 1.5 270 False 3 1 5 1
+ ], bullets = []}
+ mainstate = MainState {run = True, driver = SomeDriver gl, time = currentTime, players =
[ --SomePlayer $ DefaultPlayer S.empty 0 0 False
SomePlayer $ hwiidPlayer
, SomePlayer $ CPUPlayer 0
- ], textures = M.empty}
- gameState = GameState {level = theLevel, tanks = [ Tank 5.0 5.0 0 0 1.5 270 False 3 1 5 1
- , Tank 5.0 3.5 0 0 1.5 270 False 3 1 5 1
- ], bullets = []}
-
- runGame gameState $ runMain mainState $ do
+ ], textures = M.empty, gameState = gamestate}
+
+ runMain mainstate $ do
setup
mainLoop