Numeri is a strategic board game developed in Java as part of an Object-Oriented Programming school project.
The goal of this project was to design a complete game while applying clean software architecture principles, including MVC separation, object-oriented design, and an interactive graphical interface using Swing, while keeping a text-based version for debugging and validation.
- Turn-based board game
- Two players by default (easily extensible)
- Each player owns six pieces numbered from 1 to 6
- At each turn:
- The player rolls a dice
- Selects one or more pieces whose sum matches the dice value
- Chooses the order in which the pieces are moved
- Pieces move to the next available free cell, skipping occupied ones
- The game ends when the last three cells of the board are occupied
- The final score depends on the value of the cells and the coefficient of the piece placed on them
- Automatic detection of valid piece combinations after each dice roll
- Piece selection validation (only allowed when the sum is correct)
- Dynamic display of the chosen movement order
- Intelligent movement system with occupied-cell skipping
- Automatic end-of-game detection
- Final score calculation and display
- Text-based version (console)
- Graphical version (Java Swing)
- Clear separation between model and view
- MVC architecture (not 100%)
- Defensive programming to prevent runtime errors
- Code designed to be maintainable and extensible
The project follows a classic MVC (Model–View–Controller) architecture.
- Piece
- Player
- Cell
- Board
- Die
- Score
- NumeriView
- Rendering of the board, cells, and pieces
- Interactive graphical interface
- NumeriController
- Game rules and turn logic
- Event handling
- Synchronization between model and view
- Java
- Swing / AWT
- Object-Oriented Programming (OOP)
- MVC Architecture
- Event-driven programming
cd "Code texte"
javac Main.java
java MainThe program will prompt you for player names and guide you through the game.
cd "Code graphique"
javac MainControl.java
java MainControlDefault configuration:
- Two players: J1 and J2
- Player names can be modified in MainControl.java
How to play:
- Click Roll the dice
- Select the piece(s)
- Validate your move
- Restart game button
- Special cells (bonus, penalty, extra turn, backward movement…)
- Three-piece alignment effects
- AI-controlled player
- Score persistence
- Alternative board layouts (spiral, branching paths…)
Eve Lin
- Game logic and model design
- MVC architecture
- Text-based and graphical versions
- Core gameplay implementation and debugging
Doha Bentaoussy
- Graphical user interface development
- UI testing and validation
- Gameplay integration
This project is shared for educational and portfolio purposes. It demonstrates skills in Java development, object-oriented design, software architecture, and GUI programming.
© 2024–2025 – Eve Lin & Doha Bentaoussy