Abalone is a 2-player turn-based strategy board game played on a hexagonal board. Each player controls a set of marbles and the objective is to push six of the opponent's marbles off the board.
Players take turns moving 1–3 of their own marbles in a straight line or side-step, provided the move follows game rules. If a player has more marbles in line than the opponent (e.g. 2 vs. 1), they can push the opponent’s pieces backward — potentially off the board.
This project recreates Abalone as a console-based multiplayer game. It uses TCP sockets to allow two players to connect to a shared game server. The server handles game state and enforces the rules, while each client manages input/output.
- C++ compiler (Visual Studio or g++)
- Windows
- Open the
abalone-dp.slnfile in Visual Studio. - Set the build mode to
ReleaseorDebug. - Build the
Server,Client, andEngineprojects.
./server
Wait for clients to connect.
./client
Each player connects and takes turns.
Abalone is a 2-player strategy game where the goal is to push your opponent’s marbles off the board.
Basic rules implemented:
- Players alternate turns.
- You can select 1–3 adjacent marbles to move.
- Moves are validated server-side.
- Game ends when a player loses 6 marbles.
/Client → Client logic, UI, socket code
/Server → Server-side logic, handles connections & game state
/Engine → Core game logic (Abalone rules)
design.txt → Dev notes and plans
README.md → This file
abalone-dp/
├── Client/ # Client application (UI, input, networking)
│ ├── src/
│ │ ├── main.cpp # Entry point for client
│ │ ├── UI.cpp / UI.h # UI rendering and menu logic
│ │ ├── networkClient.cpp/h # Client-side networking (connect/send/receive)
│ │ ├── uiUtils.cpp / .h # UI utility helpers (console output, cursor control)
│ └── Client.vcxproj # Visual Studio project file
│
├── Server/ # Server application (game state management, networking)
│ ├── src/
│ │ ├── main.cpp # Entry point for server
│ └── Server.vcxproj
│
├── Engine/ # Core game logic (Abalone rules, game state)
│ ├── src/
│ │ ├── game.cpp / game.h # Core game rules and state transitions
│ │ ├── networkObjects.cpp / .h # Common data objects used in networking
│ │ ├── networkProtocol.cpp / .h # Game protocol (message types, serialization)
│ │ ├── networkServer.cpp /.h # Server logic
│ │ ├── utils.cpp / utils.h # Utility functions (validation, math, etc.)
│ └── Engine.vcxproj
│
├── design.txt # Developer notes, planning
├── abalone-dp.sln # Visual Studio solution file
└── README.md # Project overview (this file)
The following concurrency techniques were used in the project:
std::thread: Used in the server to handle multiple client connections simultaneously.mutex(from<mutex>): Used to safely access shared game state between threads.- Basic thread lifecycle management: Ensuring clean exit, join, and client disconnect handling.
- Standard C++ libraries:
<thread>for multithreading<mutex><winsock><conio><iostream>,<vector>,<string>for I/O and data management
No external or third-party frameworks were used; the entire project relies on native C++ and system sockets.
- Mark Slipenkyi — engine logic, socket handling, core game flow
- Fatkhullakh Turakhonov — network setup, UI feedback, documentation
