This project implements a Tic-Tac-Toe game using Spring Boot and WebSocket technology.
It consists of two instances, a server and a client, which communicate with each other over WebSocket connections and playing the game automatically.
Instances are able to reconnect and continue playing from the state where the other instance left off.
- Clone the repository:
git clone https://github.com/brzzznko/TicTacToe.git
- Navigate to the project directory:
cd TicTacToe
- Build app with gradle:
./gradlew build
- Run docker compose:
docker-compose up --build
- Clone the repository:
git clone https://github.com/brzzznko/TicTacToe.git
- Navigate to the project directory:
cd TicTacToe
- Run server instance with gradle:
./gradlew bootRun --args='--spring.profiles.active=server'
- Run client instance with gradle:
./gradlew bootRun --args='--spring.profiles.active=client'
You can modify the application properties to adjust the steps delay, running port, and server destination URL.
You can access the /state
endpoint to see the current game state.