diff options
Diffstat (limited to 'src/Tank.hs')
-rw-r--r-- | src/Tank.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Tank.hs b/src/Tank.hs index f3230f2..a595618 100644 --- a/src/Tank.hs +++ b/src/Tank.hs @@ -3,13 +3,12 @@ module Tank ( Tank(..) , tankY ) where -import Transformable import Vector data Tank = Tank { tankPos :: !Vertex - , tankDir :: !Vector - , tankAim :: !Vector + , tankDir :: !Rotation + , tankAim :: !Rotation , tankSpeed :: !Coord , tankTurnspeed :: !Coord , tankMoving :: !Bool @@ -26,7 +25,7 @@ tankY :: Tank -> Coord tankY = vertexY . tankPos instance Transformable Tank where - t >< tank = tank { tankPos = pos, tankDir = dir, tankAim = aim } where + transform t tank = tank { tankPos = pos , tankDir = dir, tankAim = aim } where pos = t >< tankPos tank dir = t >< tankDir tank aim = t >< tankAim tank
\ No newline at end of file |