Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boardFromMinmax:: Board->Color->Board
- boardFromMinmax board color = addToBoard board (moves!!fromJust(elemIndex (maximum minMaxOfMoves) minMaxOfMoves)) color
- where
- maxLevelOfMinmax = 4
- moves = possibleMoves board
- minMaxOfMoves = Prelude.map (\move -> (minmax (buildTree (addToBoard board move color ) color) color maxLevelOfMinmax)) moves
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement