Advertisement
Coriic

Untitled

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