Computer version of tic-tac-toe game written in Ruby.
Tic-tac-toe is originally a paper-and-pencil game for two players who take turns marking the spaces (with either X or O) in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.
This application is a general version in which two players alternate placing marks on an N×N board, with the goal of getting N of their marks in a row. The current version supports boards from 2x2 size up to 10x10.
This game can be played in three different modes:
- Player vs Player
- Player vs Bot
- Bot vs Bot
Bots can be configured up to three different levels of difficulty.
Level | Description |
---|---|
Easy | Takes decisions randomly |
Medium | Can foresee an immediate possibility of winning or losing |
Hard | Considers a wide range of outcomes before playing |