Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Nokse22/ultimate-tic-tac-toe

Play Ultimate Tic Tac Toe
https://github.com/Nokse22/ultimate-tic-tac-toe

gnome gtk gtk4 libadwaita python tic-tac-toe

Last synced: 3 months ago
JSON representation

Play Ultimate Tic Tac Toe

Awesome Lists containing this project

README

        

# Ultimate Tic Tac Toe
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-ff7b3f.svg)](https://www.python.org/)
[![Downloads](https://img.shields.io/badge/dynamic/json?color=brightgreen&label=Flathub%20Downloads&query=%24.installs_total&url=https%3A%2F%2Fflathub.org%2Fapi%2Fv2%2Fstats%2Fio.github.nokse22.ultimate-tic-tac-toe)](https://flathub.org/apps/details/io.github.nokse22.ultimate-tic-tac-toe)


Play Ultimate Tic Tac Toe.

You can play with your friends or play against a simple algorithm.

It is using the minimax algorithm. It works by recursively exploring all possible moves and their outcomes to determine the best move. The algorithm operates under the assumption that both players play optimally, making the best moves for themselves. This algorithm only sees the game it can plays in, it doesn't take into consideration what his moves can cause. If the algorithm can choose any game to play in, it will choose the one that is most needed to win. It is still a very simple algorithm, in the future I will try to improve it.


Rules from Wikipedia



Just like in regular tic-tac-toe, the two players (X and O) take turns, starting with X. The game starts with X playing wherever they want in any of the 81 empty spots. Next the opponent plays, however they are forced to play in the small board indicated by the relative location of the previous move. For example, if X plays in the top right square of a small (3 × 3) board, then O has to play in the small board located at the top right of the larger board. Playing any of the available spots decides in which small board the next player plays.

If a move is played so that it is to win a small board by the rules of normal tic-tac-toe, then the entire small board is marked as won by the player in the larger board. Once a small board is won by a player or it is filled completely, no more moves may be played in that board. If a player is sent to such a board, then that player may play in any other board. Game play ends when either a player wins the larger board or there are no legal moves remaining, in which case the game is a draw.




## Installation
### Ultimate Tic Tac Toe is available on
Download on Flathub
Get it from the Snap Store

### From source

You just need to clone the repository

```sh
git clone https://github.com/Nokse22/ultimate-tic-tac-toe.git
```

Open the project in GNOME Builder and click "Run Project".