Fix orientation error

This commit is contained in:
Kiana Sheibani 2023-01-25 15:49:42 -05:00
parent ebb27755d2
commit 079294e2df
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -3,8 +3,8 @@ module Game.State where
data Direction = U | D | L | R
movePos :: Direction -> (Int, Int) -> (Int, Int)
movePos U (x, y) = (x, y - 1)
movePos D (x, y) = (x, y + 1)
movePos U (x, y) = (x, y + 1)
movePos D (x, y) = (x, y - 1)
movePos L (x, y) = (x - 1, y)
movePos R (x, y) = (x + 1, y)