summaryrefslogtreecommitdiffstats
path: root/Game.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Game.hs')
-rw-r--r--Game.hs27
1 files changed, 25 insertions, 2 deletions
diff --git a/Game.hs b/Game.hs
index 9097bca..c782465 100644
--- a/Game.hs
+++ b/Game.hs
@@ -1,22 +1,45 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-module Game ( GameState(..)
+module Game ( Tank(..)
+ , Shoot(..)
+ , GameState(..)
, Game
, runGame
) where
import Level
-import Tank
import Texture
import Control.Monad
import Control.Monad.State
+import Data.Fixed
import qualified Data.Map as M
+data Tank = Tank
+ { posx :: !Micro
+ , posy :: !Micro
+ , dir :: !Micro
+ , aim :: !Micro
+ , speed :: !Micro
+ , turnspeed :: !Micro
+ , moving :: !Bool
+ , tankShootSpeed :: !Micro
+ , tankShootBounces :: !Int
+ } deriving Show
+
+data Shoot = Shoot
+ { shootX :: !Micro
+ , shootY :: !Micro
+ , shootDir :: !Micro
+ , shootSpeed :: !Micro
+ , bouncesLeft :: !Int
+ } deriving Show
+
data GameState = GameState
{ level :: !Level
, tanks :: ![Tank]
+ , shoots :: ![Shoot]
, textures :: !(M.Map Texture TextureObject)
} deriving (Show)