Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- outlook :: Player -> Field -> GameTree
- outlook player field = if endPosition field == Just (Just(switch player))
- then Lost
- else if possibleMoves field /= []
- then Continue [(pos, tree) | pos <- possibleMoves field, tree <- outlook (switch player) (makeMove player pos field)]
- else Draw
Advertisement
Add Comment
Please, Sign In to add comment