about summary refs log tree commit diff
path: root/test/Xanthous/DataSpec.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-10-13T16·37-0400
committerGriffin Smith <root@gws.fyi>2019-10-13T16·37-0400
commit8a4220df830adb6f1616ca02dd06902474fd25df (patch)
treeb78e5eea207e77ca82759bf05a26a77ae3729c09 /test/Xanthous/DataSpec.hs
parent8d36fb4af2f938d96c8d6c22ccc575d0a98d0d38 (diff)
Implement speed and ticks
Gormlaks now move 1/8th the speed of the character, which means we can
run away from them - yay!

Unfortunately this also introduces a bug where they'll eventually get
stuck and not do anything, so I'll be tackling that next.
Diffstat (limited to 'test/Xanthous/DataSpec.hs')
-rw-r--r--test/Xanthous/DataSpec.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/Xanthous/DataSpec.hs b/test/Xanthous/DataSpec.hs
index 26a862baa6..6fad88681a 100644
--- a/test/Xanthous/DataSpec.hs
+++ b/test/Xanthous/DataSpec.hs
@@ -24,15 +24,15 @@ test = testGroup "Xanthous.Data"
       ]
     , testProperty "directionOf laws" $ \pos dir ->
         directionOf pos (move dir pos) == dir
-    , testProperty "diffPositions is add inverse" $ \pos₁ pos₂ ->
+    , testProperty "diffPositions is add inverse" $ \(pos₁ :: Position) pos₂ ->
         diffPositions pos₁ pos₂ == addPositions pos₁ (invert pos₂)
     , testGroup "isUnit"
       [ testProperty "double direction is never unit" $ \dir ->
           not . isUnit $ move dir (asPosition dir)
       , testCase "examples" $ do
-          isUnit (Position 1 1) @? "not . isUnit $ Position 1 1"
-          isUnit (Position 0 (-1)) @? "not . isUnit $ Position 0 (-1)"
-          (not . isUnit) (Position 1 13) @? "isUnit $ Position 1 13"
+          isUnit (Position @Int 1 1) @? "not . isUnit $ Position 1 1"
+          isUnit (Position @Int 0 (-1)) @? "not . isUnit $ Position 0 (-1)"
+          (not . isUnit) (Position @Int 1 13) @? "isUnit $ Position 1 13"
       ]
     ]
   , testGroup "Direction"