As a final project for the discipline of Computer Networks, we were asked to develop a multiplayer application using sockets. We chose to develop a tic-tac-toe game, which is a simple game, but it was a great challenge to develop it using sockets.
Here is the report as requested by the teacher (in portuguese): Relatรณrio
To run this project locally, you'll need to have Python installed on your machine. With that, you can clone this repository and install the dependencies.
# Clone this repository
git clone https://github.com/abacaxiguy/tictactoe.git
After cloning the repository, you'll need to install the dependencies. To do that, run the following commands:
# Creating a virtual environment
python3 -m venv env # or python -m venv env, depending on your operating system
# Activating the virtual environment
. env/bin/activate # or env/Scripts/activate, depending on your operating system
# Installing the dependencies
pip install -r requirements.txt
With the dependencies installed, you'll need to start the socket server. To do that, run the following command:
# Starting the socket server
python server.py # remember to have the virtual environment activated
As default, the server will be running on port 5000. If you want to change that, you can do it by changing in the server.py
file. After starting the server, you can start the GUI. To do that, run the following command:
# Starting the GUI
python main.py # remember to have the virtual environment activated
โจ Now your client is running! Your opponent can do the same in their machine at the same network and you can play together! (or you can open two terminals and run the client twice if you don't have a friend ๐)
Contributions, issues and feature requests are welcome! Feel free to check issues page.
Copyright ยฉ 2023 Joรฃo Lucas ๐ค Iasmin Borba ๐ค Josรฉ Alexandre ๐ค Jhordan Lacerda
This project is licensed under the MIT license.
![]() Joรฃo Lucas |
![]() Iasmin Borba |
![]() Josรฉ Alexandre |
![]() Jhordan Lacerda |
---|