No description
Find a file
2026-02-10 13:17:43 +01:00
client a 2026-02-10 13:17:43 +01:00
server a 2026-02-10 13:17:43 +01:00
web-client a 2026-02-10 13:17:43 +01:00
build_client.sh a 2026-02-10 13:17:43 +01:00
docker-compose.yml a 2026-02-10 13:17:43 +01:00
README.md a 2026-02-10 13:17:43 +01:00

TicTacToe Project

This project contains a TCP Game Server, a Java Swing Client, and a Spring Boot Web Client.

Structure

  • server/: Java TCP Server (Port 1870). With Anticheat (Server-side validation).
  • client/: Standalone Java Swing Client. Connects to dokploy.lona-development.org:1870.
  • web-client/: Spring Boot Web Application. Acts as a proxy to the TCP Server via WebSocket.

Running with Docker Compose

To start the Server and Web Client:

docker-compose up --build
  • Server runs on port 1870.
  • Web Client runs on http://localhost:8080.

Building the Java Client

To build the standalone Java client:

./build_client.sh

To run it:

java -jar client/target/client-1.0-SNAPSHOT.jar

Note: The Java client is hardcoded to connect to dokploy.lona-development.org. Ensure this domain resolves to your server IP (or adds 127.0.0.1 dokploy.lona-development.org to /etc/hosts for local testing).

Game Protocol

  • CREATE: Starts a new game. Server returns a 6-character code.
  • JOIN <CODE>: Joins an existing game.
  • MOVE <ROW> <COL>: Places your symbol.
  • SURRENDER: Forfeits the game.