Reorganized code to add Debris class
This commit is contained in:
parent
e85dc20a48
commit
90b8d87e02
11 changed files with 57 additions and 25 deletions
17
src/Game.hs
17
src/Game.hs
|
@ -1,13 +1,13 @@
|
|||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
|
||||
module Game ( Tank(..)
|
||||
, Bullet(..)
|
||||
module Game ( Bullet(..)
|
||||
, GameState(..)
|
||||
, Game
|
||||
, runGame
|
||||
) where
|
||||
|
||||
import Level
|
||||
import Tank
|
||||
import Texture
|
||||
|
||||
import Control.Monad
|
||||
|
@ -16,19 +16,6 @@ import Data.Fixed
|
|||
import qualified Data.Map as M
|
||||
|
||||
|
||||
data Tank = Tank
|
||||
{ tankX :: !Micro
|
||||
, tankY :: !Micro
|
||||
, tankDir :: !Micro
|
||||
, tankAim :: !Micro
|
||||
, tankSpeed :: !Micro
|
||||
, tankTurnspeed :: !Micro
|
||||
, tankMoving :: !Bool
|
||||
, tankBulletSpeed :: !Micro
|
||||
, tankBulletBounces :: !Int
|
||||
, tankBulletsLeft :: !Int
|
||||
} deriving Show
|
||||
|
||||
data Bullet = Bullet
|
||||
{ bulletX :: !Micro
|
||||
, bulletY :: !Micro
|
||||
|
|
Reference in a new issue