A complete implementation of Italian Checkers (Dama Italiana) built in Java with JavaFX for the Software Engineering course.
-
3 Game Modes:
- Local: Two players on the same machine
- CPU: Play against artificial intelligence
- Online: Multiplayer over network
-
Complete Italian Checkers Rules:
- Mandatory capture
- Multi-jump (consecutive multiple captures)
- Piece promotion to king
- 40-move rule without capture (draw)
-
Modern Graphical Interface:
- Timer for each player
- Real-time score display
- Animations and visual effects
- Victory screen with game statistics
- Java 21 or higher
- Maven 3.6+
- JavaFX 21
-
Clone the repository:
git clone <repository-url> cd DamaProject
-
Compile the project:
mvn clean compile
-
Run tests:
mvn test -
Build executable JAR:
mvn package
mvn javafx:runThis will launch the main menu where you can choose your game mode.
java -jar target/DamaProject-1.0-SNAPSHOT-jar-with-dependencies.jar- Choose "Local" from the main menu
- Players take turns using the same computer
- Choose "CPU" from the main menu
- Play against the artificial intelligence
-
Start the server:
java -jar DamaProject-1.0-SNAPSHOT-jar-with-dependencies.jar -s
-
Start clients:
java -jar DamaProject-1.0-SNAPSHOT-jar-with-dependencies.jar -c
- Left Click: Select a piece
- Drag & Drop: Move the piece to desired position
- Highlighted cells show possible moves
- Mandatory Capture: You must capture when possible
src/
├── main/java/it/polimi/
│ ├── client/ # JavaFX client and interfaces
│ ├── server/ # Server and AI
│ ├── model/ # Game models (Piece, Tile, etc.)
│ └── common/ # Shared utilities
└── test/java/ # JUnit tests
- ChessBoardClient: Main graphical interface
- Server: Manages multiplayer games
- CheckersAI: Artificial intelligence for CPU mode
- Piece: Represents game pieces
- Tile: Represents board squares
The project includes comprehensive tests for all components:
# Run all tests
mvn testTests cover:
- Game logic
- Move validation
- Computer AI
- Coordinate conversions
- Error handling
Main configurations are found in GameConfig.java:
- Board size: 8x8
- Tile size: 100px
- Server port: 1234
- Connection timeout: 5000ms
mvn clean packageThe executable JAR will be in target/DamaProject-1.0-SNAPSHOT-jar-with-dependencies.jar
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
- Matrundola Tony David - Main Developer
Course: Software Engineering
Year: 2025
University: Politecnico di Milano