https://github.com/erenoguzyesil/tictaccli
A simple command-line Tic-Tac-Toe game against the computer with difficulty levels
https://github.com/erenoguzyesil/tictaccli
cli cli-game command-line console-game game pip python terminal terminal-game tictactoe
Last synced: 2 months ago
JSON representation
A simple command-line Tic-Tac-Toe game against the computer with difficulty levels
- Host: GitHub
- URL: https://github.com/erenoguzyesil/tictaccli
- Owner: erenoguzyesil
- License: mit
- Created: 2023-08-15T13:38:05.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-17T11:52:27.000Z (almost 3 years ago)
- Last Synced: 2026-01-14T10:16:37.136Z (5 months ago)
- Topics: cli, cli-game, command-line, console-game, game, pip, python, terminal, terminal-game, tictactoe
- Language: Python
- Homepage: https://pypi.org/project/tictaccli/
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tictaccli
A simple command-line Tic-Tac-Toe game played against the computer.

## Installation
```
pip install tictaccli
```
## Usage
Run the command after installing:
```
tictactoe
```
## Other things you can do
### `tictactoecli.mark.Mark` and `tictactoecli.board.Board` classes
The `Mark` class, which inherits the `Enum` class, has the following fields: `X, O, and NULL`
* `Mark.X` and `Mark.O` fields are self-explanatory; they are the two marks on a Tic-Tac-Toe board.
* `Mark.NULL` field represents an empty field in a Tic-Tac-Toe board.
The `Board` class acts as a Tic-Tac-Toe board, which holds its marks as `Mark` in the `positions` field of its instance.
Check out the code to see the other methods.
### `tictactoecli` module
The `tictactoecli` module contains a variety of functions related to the gameplay.
- `tictactoecli:play()` starts the Tic-Tac-Toe game, which can also be achieved by typing the `tictactoe` command in the Terminal after installation.