How msagor/board_game works
This repository implements networked Kalah: two console clients connect to a server that sets up games and coordinates player turns, while each side uses a local game/board model. A separate standalone console game is also included. The sampled sources show board setup, move validation and execution, and turn coordination; excerpts omit some details of the server protocol and single-player behavior, so those links are limited to the documented setup and visible socket flow.
Main entry points: Mankala_kalah_server.java Server coordinator · Mankala_kalah_client1.java Client 1 · Mankala_kalah_client2.java Client 2 · kalah_game.java Server game
Components 20
Player clients
- Client 1
mankala_board_game/Mankala_kalah_client1/src/mankala_kalah_client1/Mankala_kalah_client1.java - Client 2
mankala_board_game/Mankala_kalah_client2/src/mankala_kalah_client2/Mankala_kalah_client2.java - Client game
mankala_board_game/Mankala_kalah_client1/src/mankala_kalah_client1/kalah_game.java - Client game
mankala_board_game/Mankala_kalah_client2/src/mankala_kalah_client2/kalah_game.java - Client board
mankala_board_game/Mankala_kalah_client1/src/mankala_kalah_client1/Board.java - Client board
mankala_board_game/Mankala_kalah_client2/src/mankala_kalah_client2/Board.java
Game server
- Server coordinator
mankala_board_game/Mankala_kalah_server/src/mankala_kalah_server/Mankala_kalah_server.java - Server game
mankala_board_game/Mankala_kalah_server/src/mankala_kalah_server/kalah_game.java - Server board
mankala_board_game/Mankala_kalah_server/src/mankala_kalah_server/Board.java
Kalah rules
- Move checks
mankala_board_game/Mankala_kalah_client1/src/mankala_kalah_client1/Checks.java - Move execution
mankala_board_game/Mankala_kalah_client1/src/mankala_kalah_client1/Move.java - Move checks
mankala_board_game/Mankala_kalah_server/src/mankala_kalah_server/Checks.java - Move execution
mankala_board_game/Mankala_kalah_server/src/mankala_kalah_server/Move.java
Standalone game
- Console game
mankala_board_game/game itself/kalah_game.java - Game board
mankala_board_game/game itself/Board.java - Move checks
mankala_board_game/game itself/Checks.java - Move execution
mankala_board_game/game itself/Move.java
Other components
- Player 1
- Player 2
- Client connections
Connections 25
- Player 1 → Client 1: enters moves
- Player 2 → Client 2: enters moves
- Client 1 → Client connections: connects to
- Client 2 → Client connections: connects to
- Server coordinator → Client connections: accepts connections
- Server coordinator → Client 1: sends setup
- Server coordinator → Client 2: sends setup
- Client 1 → Server coordinator: sends moves
- Client 2 → Server coordinator: sends moves
- Client 1 → Client game: updates game
- Client 2 → Client game: updates game
- Client game → Move checks: checks moves
- Client game → Move execution: executes moves
- Client game → Move checks: checks moves
- Client game → Move execution: executes moves
- Client 1 → Client board: creates board
- Client 2 → Client board: creates board
- Server coordinator → Server board: creates board
- Server coordinator → Server game: creates game
- Server coordinator → Server game: coordinates turns
- Server game → Move checks: checks moves
- Server game → Move execution: executes moves
- Console game → Game board: starts with board
- Console game → Move checks: checks moves
- Console game → Move execution: executes moves