Jump to content

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 leastlast ressourceresort, it places a piece randomly.
autoTurn :: Bool -> (Int, Char, String) -> IO (Int, Char, String)
autoTurn forceRandom (count, player, game) = do
21

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.