Restructured Simulation module

This commit is contained in:
Matthias Schiffer 2010-04-11 02:12:48 +02:00
parent b694c7705e
commit 4ecea2f9dc
2 changed files with 42 additions and 54 deletions

View file

@ -2,8 +2,6 @@
module Game ( Bullet(..)
, GameState(..)
, Game
, runGame
) where
import Level
@ -28,9 +26,3 @@ data GameState = GameState
, tanks :: ![Tank]
, bullets :: ![Bullet]
} deriving (Show)
newtype Game a = Game (State GameState a)
deriving (Monad, MonadState GameState)
runGame :: GameState -> Game a -> (a, GameState)
runGame st (Game a) = runState a st