Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.68 KB

README.md

File metadata and controls

29 lines (15 loc) · 1.68 KB

Tic-tac-toe

It's a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner. It is a solved game with a forced draw assuming best play from both players.

User interface

It is a simple game, using command line as interface.

image

Player is able to choose field by number, then computer is processing the board and making a move.

image

This game uses minimax algorithm, so win is impossible. Your perfect match may end in a draw, or you may lose, but there is no way you can beat the computer.

image

If You won somehow, tell me about it by creating an issue.

Gameplay

In order to win the game, a player must place three of their marks in a horizontal, vertical, or diagonal row.

Example

Players soon discover that the best play from both parties leads to a draw. Hence, tic-tac-toe is most often played by young children, who often have not yet discovered the optimal strategy.

See more on Wikipedia