diff options
Diffstat (limited to 'HTanks.hs')
-rw-r--r-- | HTanks.hs | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -165,13 +165,13 @@ simulationStep = do shootingtanks = map (\(tank, _, n) -> (tank, n)) $ filter (\(tank, shoot, _) -> shoot && (shootsLeft tank) > 0) $ ts newtanks = map (\(tank, shoot, _) -> if shoot then tank {shootsLeft = (shootsLeft tank) - 1} else tank) $ ts newshoots = map (\(tank, n) -> Shoot - { shootX = posx tank - , shootY = posy tank - , shootDir = aim tank - , shootSpeed = tankShootSpeed tank - , bouncesLeft = tankShootBounces tank - , shootTank = n - }) shootingtanks + { shootX = posx tank + , shootY = posy tank + , shootDir = aim tank + , shootSpeed = tankShootSpeed tank + , bouncesLeft = tankShootBounces tank + , shootTank = n + }) shootingtanks modify $ \state -> state {players = p} |