3D Tic-Tac-Toe game using Pygame.
This software requires PyGame. To install (requires python3):
The pip3 python package manager should be automatically available after Python3 is installed. To install it, if required:
Ubuntu, Debian, and other Linux distros that use apt:
sudo apt update
sudo apt install python3-pip
In Arch Linux/Manjaro Linux distros, using pacman:
pacman -S python-pip
To verify pip3 installation:
pip3 --version
This version of Qubic uses PyGame as its engine, and the repositories' automated tests make use of the PyTest library;
To install all of the repositories' dependencies on your system:
pip3 install -r requirements.txt
To verify PyGame's correct installation:
python3 -m pygame.examples.aliens
And to verify PyTest's correct installation:
pytest -v
Clone the repository to your preferred location by using the command:
git clone https://github.com/cmpsvictor/qubic/
cd qubic
And run the game with
python3 main.py
In the event that you wish to make your own changes to this code, you can run its automated tests with:
pytest --verbose testes.py
To achieve victory, a player has to manage to insert four consecutive pieces in a straight sequence - be it on a single surface or on all four. Notice that you'll also need to defend yourself from all of those possibilities, as your opponent'll have the same offensive opportunities laid out before him.
Write your desired spot to place a piece on the screen, with 1 being the first square on the upper surface and 64 being the final square on the last surface. The game will return an error message if you attempt an illegal spot, but will still allow you to play normally.
For more information, refer to the game's Wikipedia page.
Originally written as a project for the Técnicas de Programação I freshman course in Computer Science class.
Authors:
- João Renner Rudge
- Lucas Medeiros Cornetta
- Victor Aristóteles Rocha Campos