b0VIM 7.2 N(Ojulianalucenajuliana.local~julianalucena/cin/8-periodo/funcional/mancala/Rules_Test.hsutf-8 3210#"! UtpWad=WmlQzvu\( u q p T  C  \ 2 . -  Y  N SqGh.|>Ti/HDC makeMoveTest, canMoveAgainTest, getWinnerTest, isPossibleMoveTest]main = runTestTT $ TestList [isMancalaTest, hasMoveTest, canCaptureTest, ] True (isPossibleMove (B, 1) ([0, 2, 7], [0, 2, 8])) TestCase $ assertEqual "Player B try a regular move" False (isPossibleMove (B, 4) ([0, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player B try an irregular move (2)" False (isPossibleMove (B, 2) ([0, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player B try an irregular move (1)" False (isPossibleMove (B, 0) ([0, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player B try an irregular move" True (isPossibleMove (A, 1) ([0, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player A try a regular move" False (isPossibleMove (A, -1) ([0, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player A try an irregular move (3)" False (isPossibleMove (A, 3) ([0, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player A try an irregular move (2)" False (isPossibleMove (A, 0) ([0, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player A try an irregular move (1)" False (isPossibleMove (A, 2) ([2, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player A try an irregular move"isPossibleMoveTest = TestList [ ] Nobody (getWinner ([0, 1, 4], [1, 0, 4])) TestCase $ assertEqual "Nobody won the game." B (getWinner ([0, 0, 4], [7, 2, 5])), TestCase $ assertEqual "Player B is the winner" A (getWinner ([2, 2, 7], [0, 2, 8])), TestCase $ assertEqual "Player A is the winner"getWinnerTest = TestList [ ] False (canMoveAgain (B, 1) ([2, 5, 0], [7, 9, 1])) TestCase $ assertEqual "Player B can not move again if the last hole is not a mancala" True (canMoveAgain (A, 2) ([2, 5, 0], [7, 9, 1])), TestCase $ assertEqual "Player A can move again if the last hole is a mancala"canMoveAgainTest = TestList [ ] ([3, 6, 0, 0], [1, 9, 0, 5]) (makeMove (B, 2) ([2, 5, 0, 0], [0, 9, 5, 3])) TestCase $ assertEqual "Player B makes a move and capture" ([2, 5, 0], [7, 0, 2]) (makeMove (B, 1) ([1, 5, 0], [7, 2, 1])), TestCase $ assertEqual "Player B makes a simple move" ([0, 6, 1, 7], [0, 9, 3, 3]) (makeMove (A, 0) ([2, 5, 0, 0], [7, 9, 3, 3])), TestCase $ assertEqual "Player A makes a move and capture" ([0, 6, 0], [7, 9, 1]) (makeMove (A, 0) ([1, 5, 0], [7, 9, 1])), TestCase $ assertEqual "Player A makes a simple move"makeMoveTest = TestList [ ] False (canCapture (B, 0) sampleBoard) TestCase $ assertEqual "Player B can NOT capture from hole 0" True (canCapture (B, 3) sampleBoard), TestCase $ assertEqual "Player B can capture from hole 3" False (canCapture (A, 6) ([0,0,6,6,6,5,1],[0,5,5,5,5,4,0])), TestCase $ assertEqual "Player A can NOT capture from hole 1" False (canCapture (A, 2) sampleBoard), TestCase $ assertEqual "Player A can NOT capture from hole 2" True (canCapture (A, 3) sampleBoard), TestCase $ assertEqual "Player A can capture from hole 3"canCaptureTest = TestList [ ] False (hasMove B ([0, 0, 2, 0, 8], [0, 0, 0, 0, 11])) TestCase $ assertEqual "Player B does NOT have moves to do" True (hasMove A ([0, 0, 2, 0, 8], [0, 0, 0, 0, 11])), TestCase $ assertEqual "Player A has moves to do"hasMoveTest = TestList [ ] False (isMancala (A, 1) ([2, 5, 0], [7, 9, 1])) TestCase $ assertEqual "The other holes are not mancala" True (isMancala (A, 2) ([2, 5, 0], [7, 9, 1])), TestCase $ assertEqual "The last hole is mancala"isMancalaTest = TestList [sampleBoard = ([3, 5, 0, 1, 3], [7, 2, 1, 1, 2])import Test.HUnitimport Rulesimport Boardimport Types-- Tests of Rules.hs-- Rules_Types.hs