summaryrefslogtreecommitdiffstats
path: root/Game.hs
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-03-08 23:12:14 +0100
committerMatthias Schiffer <matthias@gamezock.de>2010-03-08 23:12:14 +0100
commite03de6bfe6b90f8862e405c3797503ccd2722e1b (patch)
tree3c2f5361385d31f0c263f740478fbe3d18d7db19 /Game.hs
parent907cb95dae83a25dabf377228f4d70a1cab3216f (diff)
downloadhtanks-e03de6bfe6b90f8862e405c3797503ccd2722e1b.tar
htanks-e03de6bfe6b90f8862e405c3797503ccd2722e1b.zip
Limit number of bullets/tank; save tank number with shoot
Diffstat (limited to 'Game.hs')
-rw-r--r--Game.hs26
1 files changed, 14 insertions, 12 deletions
diff --git a/Game.hs b/Game.hs
index c782465..1f85376 100644
--- a/Game.hs
+++ b/Game.hs
@@ -17,23 +17,25 @@ 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
+ { posx :: !Micro
+ , posy :: !Micro
+ , dir :: !Micro
+ , aim :: !Micro
+ , speed :: !Micro
+ , turnspeed :: !Micro
+ , moving :: !Bool
+ , tankShootSpeed :: !Micro
, tankShootBounces :: !Int
+ , shootsLeft :: !Int
} deriving Show
data Shoot = Shoot
- { shootX :: !Micro
- , shootY :: !Micro
- , shootDir :: !Micro
- , shootSpeed :: !Micro
+ { shootX :: !Micro
+ , shootY :: !Micro
+ , shootDir :: !Micro
+ , shootSpeed :: !Micro
, bouncesLeft :: !Int
+ , shootTank :: !Int
} deriving Show
data GameState = GameState