/TaTeTiPOOP

TaTeTiPoo is an object oriented programming TicTacToe game made in python

Primary LanguagePython

TaTeTiPoo

TaTeTiPoo is an object oriented programming TicTacToe game made in python

Features

  • Supports different game piece types (e.g., circles, crosses, etc.)
  • Dynamic Board (4x4, 3x3, 20x20)
  • Allows as many teams as wanted to play a match
  • Dynamic victory conditions (e.g., 3 in a row, 4 in a row)

Requirements

  • Python 3.10+
  • pip

Installation

  1. Clone the repository:

https:

git clone https://github.com/darthpedroo/TaTeTiPOOP.git
cd TaTeTiPOOP

or ssh:

git@github.com:darthpedroo/TaTeTiPOOP.git
cd TaTeTiPOOP
  1. To run the game:
   python main.py

Testing

Prerequisites

Use the package manager pip to install pytest.

pip install pytest

Use the package manager pip to install coverage.

pip install coverage

How To Run Tests

If you don't want to see a coverage report, run:

python -m pytest

Generate Coverage Report

To run the tests and see the coverage report run:

coverage run -m pytest

To generate coverage report run:

coverage report

To convert the report into an html run:

coverage html

Expected Output:

Wrote HTML report to htmlcov\index.html

Docker

To pull the image from docker hub do:

docker pull darthpedroo/tateti-game:latest

You can run this project using Docker too.

Prerequisites

  • Docker installed in your local system

Build the Docker Image

docker build -t tateti-game .

Run The Game

docker run -it tateti-game

Run tests inside Docker

To run the test:

docker run -it tateti-game python -m pytest

To generate coverage report:

docker run -it tateti-game coverage run -m pytest

To view The coverage report:

docker run -it tateti-game coverage report

To generate an HTML coverage report:

docker run -it tateti-game coverage html

Clean Docker Containers:

docker container prune

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT