This repository contains a multiplayer Chinese Checkers game implemented in Java with both server and client architecture. The application allows players to join a game, send text messages, and make moves on a synchronized board. The game supports 2, 3, 4, or 6 players, including modes with a bot and a special "YinAndYang" board variant.
- Multiplayer gameplay with client-server communication
- Selection of player count (2, 3, 4, 6) and game variant
- Board state synchronization between all players
- Move validation for each player
- Real-time text messaging between players (CLI)
- Error handling for invalid moves
- Play against a bot
- Graphical User Interface (GUI) and Command Line Interface (CLI)
The project is written in Java and logically separated into the main following components:
- Server: Manages communication between clients and controls the game state
- Client: Connects to the server and allows players to interact with the game (GUI/CLI)
- Packets: Used for exchanging data between the server and clients
- Board and Game: Implements the Chinese Checkers game logic
- Programming Language: Java
- Design Patterns:
- Factory (
BoardFactory) — for creating boards based on player count - Singleton (
GameManagerSingleton) — ensures only one instance of the game manager exists - Observer (
ClientObserver, Observer in GUI) — the client uses observers to react to game state changes and server events
- Factory (
- Serialization: Used for transmitting objects between server and client
- Java 17+
- Maven (for build & dependency management)
- JavaFX 17 (GUI)
- Automatic dependencies via Maven:
- Jackson Databind (serialization)
- JavaFX Controls/FXML (GUI)
- Atlantafx Base (GUI styling)
- SLF4J + Logback (logging)
- JUnit Jupiter, Mockito (testing)
- Clone the repository:
git clone https://github.com/elizaluszczyk/chinese-checkers.git
- Navigate to the project directory:
cd chinese-checkers - Build the project:
mvn package
- Server:
Start the server with:mvn exec:java -Dexec.args="server" - Client (GUI):
Start the client application with:mvn exec:java -Dexec.args="client" - Client (CLI):
Start the client in command line mode with:mvn exec:java -Dexec.args="client-cli" - The first connected client chooses the number of players, board type, and sets their nickname.
Other players also set their nicknames.
After all players join, the game starts automatically. - Players can send text messages and make moves in the format:
MOVE x1,y1 TO x2,y2 - To leave the game, type:
exit
Chinese Checkers is a strategy board game where the goal is to move all your pieces from your triangle to the opposite triangle. Players can move to adjacent spaces or jump over other pieces (their own or opponents’) in a single turn.
- Graphical User Interface (GUI)
- Additional game variants support
Eliza Łuszczyk




