-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test.hs
46 lines (37 loc) · 1.64 KB
/
Test.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module Test where
import AIPlayer
import GameHelper
import GameIO
import GameVisualization
import HumanPlayer
import TypeDef
import UltimateTicTacToe
ubc = uBoardToCell --alias
testStart1 :: IO()
testStart1 = play ultimateTicTacToe (ContinueGame startState) [human_player, simple_player]
where startState = (State (ubc tBoardAlmostX) 0 X)
testStart2 :: IO()
testStart2 = play ultimateTicTacToe (ContinueGame startState) [human_player, simple_player]
where startState = (State (ubc tBoardAlmostO) 0 O)
testStart3 :: IO()
testStart3 = play ultimateTicTacToe (ContinueGame startState) [human_player, simple_player]
where startState = (State (ubc tUBoardAlmostX) 2 X)
testStart4 :: IO()
testStart4 = play ultimateTicTacToe (ContinueGame startState) [human_player, simple_player]
where startState = (State (ubc tUBoardAlmostO) 2 O)
testStart5 :: IO()
testStart5 = play ultimateTicTacToe (ContinueGame startState) [human_player, simple_player]
where startState = (State (ubc tUBoardAlmostDraw) 1 X)
testMiniMax :: IO()
testMiniMax = playFast ultimateTicTacToe (ContinueGame startState) [simple_player, betterH_player]
where startState = (State (ubc tBoardMinimax) (-1) O)
--testPlayDraw :: IO()
--testPlayDraw = play ultimateTicTacToe (ContinueGame startState) [human_player, simple_player]
-- where startState = (State (ubc tUBoardDraw) 2 O)
--
--testPlayXWin :: IO()
--testPlayXWin = play ultimateTicTacToe (ContinueGame startState) [human_player, simple_player]
-- where startState = (State (ubc testUBoardWinX) 2 O)
testEndScenario :: IO ()
testEndScenario =
play ultimateTicTacToe (EndOfGame (Just X) (State emptyUBoardCell (-1) X)) []