Restructured Simulation module
This commit is contained in:
parent
b694c7705e
commit
4ecea2f9dc
2 changed files with 42 additions and 54 deletions
|
@ -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
|
||||
|
|
Reference in a new issue