Skip to main content

Stratego Board Game with AI (Academic Project)

Designed and implemented a Java-based board game with AI opponents, focusing on clean architecture, design patterns, and responsive UI.

Overview

This project was a Master’s-level academic assignment involving the design and implementation of a desktop version of the board game Stratego, allowing a human player to compete against an AI opponent.

The focus extended well beyond gameplay mechanics: the project emphasised software architecture, maintainability, responsiveness, and testability, mirroring professional development practices rather than a simple game prototype.


Core Objectives

The project was guided by several technical and architectural goals:

  • implement a complete playable version of Stratego
  • design an AI opponent with clear, extensible decision logic
  • maintain a responsive graphical interface at all times
  • apply recognised design patterns appropriately
  • structure the codebase for clarity, testability, and evolution
  • follow disciplined version control and testing practices

Architecture & Design Approach

The application was structured using a Model–View–Controller (MVC) architecture to enforce separation of concerns between game logic, user interface, and control flow.

Several design patterns were applied deliberately, including:

  • Strategy pattern for AI behaviour and decision-making
  • Singleton pattern for shared resources (e.g. persistence or configuration)
  • clear abstraction boundaries between game rules, AI logic, and UI rendering

This approach ensured the system remained modular and understandable as complexity increased.


AI & Multithreading

The AI opponent was designed to operate independently from the UI thread.

To maintain responsiveness:

  • AI computation and game logic were executed in separate threads
  • UI updates were synchronised safely with the JavaFX application thread
  • long-running operations never blocked user interaction

This resulted in a smooth gameplay experience even during AI decision-making phases.


Implementation & Tooling

Key implementation aspects included:

  • JavaFX and SceneBuilder for structured, maintainable UI construction
  • Maven for dependency management and build consistency
  • GitHub for version control with incremental, traceable commits
  • JUnit-based unit testing
  • code coverage tooling to measure and improve test completeness

The project also required a formal written report, documenting architectural choices, design patterns, and implementation rationale.


Timeframe & Context

  • Duration: ~9 months
  • Context: Master’s degree academic project
  • Collaboration: Supported full development lifecycle
  • Constraints: Academic requirements, architectural justification, testing standards

Skills Demonstrated

This project demonstrates:

  • object-oriented design in a non-trivial application
  • practical application of design patterns
  • multithreaded application development
  • clean separation of concerns
  • test-driven and test-aware development
  • disciplined use of version control
  • ability to explain and justify technical decisions formally

Why This Project Matters

Although academic in origin, this project reflects professional-grade engineering concerns:

  • responsiveness under load
  • architectural clarity
  • maintainability over time
  • correctness through testing
  • thoughtful use of abstraction

It provided a strong foundation for later work on larger, production-oriented systems.


Final Note

This project is not client-owned and may be expanded with screenshots, diagrams, or code excerpts where appropriate.

It represents a formative step in applying engineering discipline to interactive, stateful applications, rather than focusing purely on surface-level functionality.