Guest User

Untitled

a guest
May 10th, 2013
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. outlook :: Player -> Field -> GameTree
  2. outlook player field = if endPosition field == Just (Just(switch player))
  3.                           then Lost
  4.                           else if possibleMoves field /= []
  5.                                   then Continue [(pos, tree) | pos <- possibleMoves field, tree <- outlook (switch player) (makeMove player pos field)]
  6.                                   else Draw
Advertisement
Add Comment
Please, Sign In to add comment