Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
IOG Engineering committed Feb 3, 2023
1 parent 9519fe3 commit e7bbb36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 2023-02-03/aoc12/src/AOC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module AOC where
type Position = (Int, Int, Char)

distance :: Position -> Position -> Int
distance _ _ = 1
distance _ (x, _, _) = x
1 change: 1 addition & 0 deletions 2023-02-03/aoc12/test/AOCSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ spec :: Spec
spec = describe "distance" $ do
it "between 2 positions" $ do
distance (0, 0, 'a') (1, 0, 'a') `shouldBe` 1
distance (0, 0, 'a') (2, 0, 'a') `shouldBe` 2

0 comments on commit e7bbb36

Please sign in to comment.