poole@CPSC-M-POOLE01 haskell % ghci GHCi, version 9.4.8: https://www.haskell.org/ghc/ :? for help ghci> :l Play [1 of 2] Compiling CountGame ( CountGame.hs, interpreted ) [2 of 2] Compiling Play ( Play.hs, interpreted ) Ok, two modules loaded. ghci> cg = countGame 20 [1,2,3,5,7] ghci> let (cg, ss) = createCountGame 20 [1,2,3,5,7] in play cg ss (simple_count_player 20 [1,2,3,5,7]) (0,0,0) Tournament results: 0 wins 0 losses 0 ties Who starts? 0=you, 1=computer, 2=exit. 1 The computer chose 7 State: 7 choose one of [1,2,3,5,7] 5 The computer chose 7 State: 19 choose one of [1,2,3,5,7] 1 Computer won! Tournament results: 0 wins 1 losses 0 ties Who starts? 0=you, 1=computer, 2=exit. 1 The computer chose 7 State: 7 choose one of [1,2,3,5,7] 3 The computer chose 7 State: 17 choose one of [1,2,3,5,7] 2 The computer chose 7 You Won Tournament results: 1 wins 1 losses 0 ties Who starts? 0=you, 1=computer, 2=exit. 2 (1,1,0) ghci> Leaving GHCi. poole@CPSC-M-POOLE01 haskell % ghci GHCi, version 9.4.8: https://www.haskell.org/ghc/ :? for help ghci> :l Play [1 of 2] Compiling MagicSum ( MagicSum.hs, interpreted ) [2 of 2] Compiling Play ( Play.hs, interpreted ) Ok, two modules loaded. ghci> play magicsum magicsum_start (mm_player magicsum) (0,0,0) :2:31: error: Variable not in scope: mm_player :: Game -> Player ghci> :l Play [1 of 3] Compiling MagicSum ( MagicSum.hs, interpreted ) [2 of 3] Compiling Minimax ( Minimax.hs, interpreted ) [3 of 3] Compiling Play ( Play.hs, interpreted ) Ok, three modules loaded. ghci> play magicsum magicsum_start (mm_player magicsum) (0,0,0) Tournament results: 0 wins 0 losses 0 ties Who starts? 0=you, 1=computer, 2=exit. 0 State: ([],[]) choose one of [1,2,3,4,5,6,7,8,9] 6 The computer chose 5 State: ([6],[5]) choose one of [1,2,3,4,7,8,9] 3 The computer chose 9 State: ([3,6],[9,5]) choose one of [1,2,4,7,8] 4 The computer chose 8 State: ([4,3,6],[8,9,5]) choose one of [1,2,7] 1 The computer chose 2 Computer won! Tournament results: 0 wins 1 losses 0 ties Who starts? 0=you, 1=computer, 2=exit. 1 The computer chose 9 State: ([],[9]) choose one of [1,2,3,4,5,6,7,8] 5 The computer chose 8 State: ([5],[8,9]) choose one of [1,2,3,4,6,7] 4 The computer chose 6 State: ([4,5],[6,8,9]) choose one of [1,2,3,7] 3 The computer chose 7 State: ([3,4,5],[7,6,8,9]) choose one of [1,2] 1 The computer chose 2 Computer won! Tournament results: 0 wins 2 losses 0 ties Who starts? 0=you, 1=computer, 2=exit.