Tic-tac-toe: Difference between revisions
m
→{{header|Haskell}}: fix English error (misspelling of “last resort”) in comment
(→{{header|Ruby}}: improve AI’s defense; refactor a lot; make more idiomatic; make board printout look nicer) |
m (→{{header|Haskell}}: fix English error (misspelling of “last resort”) in comment) |
||
Line 2,032:
-- and tries to block.
-- otherwise, it tries to guess the best position for the next movement.
-- as a
autoTurn :: Bool -> (Int, Char, String) -> IO (Int, Char, String)
autoTurn forceRandom (count, player, game) = do
|