Tic-tac-toe: Difference between revisions
→{{header|Groovy}}: fix grammar in introduction; remove blank lines around code
(→{{header|Ruby}}: add introduction, listing the classes and describing the AI) |
(→{{header|Groovy}}: fix grammar in introduction; remove blank lines around code) |
||
Line 1,741:
}</lang>
=={{header|Groovy}}==
Simplified version of Tic
<lang Groovy>class Main {
def input = new Scanner(System.in)
Line 1,877 ⟶ 1,875:
return builder.toString();
}
}</lang>▼
▲</lang>
=={{header|Haskell}}==
Computer player has three strategies: 1. Try to block the opponent first, 2. Try to guess a good position for the next move, 3. Place a piece randomly.
|