Tic-tac-toe: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 144: | Line 144: | ||
}</lang> |
}</lang> |
||
Output: |
|||
<pre> Tic-tac-toe game player. |
|||
1|2|3 |
|||
-+-+- |
|||
4|5|6 |
|||
-+-+- |
|||
7|8|9 |
|||
Input the index of your move (from [1, 2, 3, 4, 5, 6, 7, 8, 9]): 1 |
|||
You chose 1 |
|||
X|2|3 |
|||
-+-+- |
|||
4|5|6 |
|||
-+-+- |
|||
7|8|9 |
|||
I chose 5 |
|||
X|2|3 |
|||
-+-+- |
|||
4|O|6 |
|||
-+-+- |
|||
7|8|9 |
|||
Input the index of your move (from [2, 3, 4, 6, 7, 8, 9]): 2 |
|||
You chose 2 |
|||
X|X|3 |
|||
-+-+- |
|||
4|O|6 |
|||
-+-+- |
|||
7|8|9 |
|||
I chose 4 |
|||
X|X|3 |
|||
-+-+- |
|||
O|O|6 |
|||
-+-+- |
|||
7|8|9 |
|||
Input the index of your move (from [3, 6, 7, 8, 9]): 3 |
|||
You chose 3 |
|||
You win! |
|||
</pre> |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |