Removed IO from Game monad

This commit is contained in:
Matthias Schiffer 2010-04-11 01:48:55 +02:00
parent d2be8eb410
commit b694c7705e
5 changed files with 31 additions and 34 deletions

View file

@ -74,8 +74,8 @@ setup = do
render :: Main ()
render = do
tanklist <- lift $ gets tanks
bulletlist <- lift $ gets bullets
tanklist <- gets $ tanks . gameState
bulletlist <- gets $ bullets . gameState
playerlist <- gets players
textureWood <- getTexture TextureWood
@ -84,7 +84,7 @@ render = do
textureBullet <- getTexture TextureBullet
textureCrosshair <- getTexture TextureCrosshair
(lw, lh) <- lift $ gets level >>= \l -> return (fromIntegral . levelWidth $ l :: GLfloat, fromIntegral . levelHeight $ l :: GLfloat)
(lw, lh) <- gets (level . gameState) >>= \l -> return (fromIntegral . levelWidth $ l :: GLfloat, fromIntegral . levelHeight $ l :: GLfloat)
liftIO $ do
clear [ColorBuffer]