Core domain
Grid, pawn, player, position and game-rule classes describe Othello in plain Java. This layer decides what a valid move is and which pieces must be flipped without knowing anything about JavaFX.
A JavaFX Othello application organized as a maintainable software product, with separated game logic, presentation, tests and automated delivery.
Engineering intent
I approached this Othello game as more than a collection of rules and buttons. The objective was to organize a complete desktop application so that each responsibility had a clear place, the behavior could be tested without opening the interface and another developer could build or run the project without depending on my IDE.
The engineering goal
The game needed to support valid-move detection, piece capture, scoring, multiple player modes, undo, save and load while keeping the JavaFX interface independent from the core rules. That separation made new features easier to add and reduced the risk that a visual change would break the game itself.
Project structure
Grid, pawn, player, position and game-rule classes describe Othello in plain Java. This layer decides what a valid move is and which pieces must be flipped without knowing anything about JavaFX.
Gameplay and controllers coordinate turns, scores, game modes and the history of states. Save, load and undo are handled as explicit application features rather than being mixed into button code.
The graphics package exposes reusable board-game abstractions, while the JavaFX implementation builds the window, board, controls and click handling behind those interfaces.
Configuration, file persistence, the Java module descriptor and Gradle build scripts connect the application to the operating system and its runtime dependencies.
Working principles
Interfaces between the controller and view keep the application logic from depending directly on one concrete screen implementation.
Each move creates a game-state snapshot. The same model supports undo, persistence and restoring a previous session.
A suite of 46 JUnit and Mockito tests covers board rules, players, gameplay and controllers without requiring the JavaFX window to be launched.
The README explains prerequisites and consistent build, test and run commands for macOS, Linux and Windows.
Professional delivery
The Gradle wrapper pins the build workflow so contributors do not need to install a matching Gradle version globally.
GitLab CI builds the project with JDK 22 and preserves the generated JAR as a pipeline artifact.
The Java module system and jlink configuration prepare a self-contained runtime image instead of assuming every user has a correctly configured JavaFX environment.
Playable demo
Browser adaptation
Place a piece on a highlighted square to surround and flip the opponent's pieces. Choose the original two-player experience or face the project's Minimax AI.
Game mode
2
2
Your turn (Black). You play against the AI.
Reflection
The most important result is not only a playable Othello game. It is a codebase with visible boundaries: rules can evolve independently, presentation technology can be replaced, automated checks protect existing behavior and the delivery path is part of the repository. This is the foundation that allows a small application to grow without becoming difficult to maintain.