diff options
Diffstat (limited to 'HTanks.hs')
-rw-r--r-- | HTanks.hs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -97,7 +97,7 @@ simulationStep = do let dx = (speed oldtank) * fromRational (round (x*1000/length)%1000000) dy = (speed oldtank) * fromRational (round (y*1000/length)%1000000) - let tank = oldtank {posx = dx + posx oldtank, posy = dy + posy oldtank} + let tank = oldtank {posx = dx + posx oldtank, posy = dy + posy oldtank, dir = fromRational $ round ((atan2 y x)*1000000*180/pi)%1000000} lift $ modify $ \state -> state {tanks = tank:(tail . tanks $ state)} |