Connect Four

Phase 1: Board model, rule engine and configuration system

Implement dynamic board sizing, gravity-based placement and win detection.

  • Generate variable-size grid
  • Validate moves
  • Detect horizontal/vertical/diagonal wins

Functional Output: Fully functioning logic engine with configurable dimensions and correct win evaluation.


Phase 2: GUI foundation and interactive board rendering

Build clickable visual grid, piece placement feedback and configuration dialog.

  • Render dynamic grid
  • Animate piece drops
  • Provide setup options

Functional Output: Game board displayed interactively with correct visual responses to user actions.


Phase 3: Human-vs-Human gameplay flow

Integrate engine + GUI to support full turn cycles and legal piece placement between two players.

  • Enforce turn order
  • Block illegal columns
  • Update game state

Functional Output: Two-player matches run correctly with alternating turns and win detection.


Phase 4: Basic AI (weak level) and AI integration

Add a CPU player selecting random legal moves and integrate it into turn structure.

  • Generate legal moves
  • Pick randomly
  • Execute reliably

Functional Output: Weak AI completes full turns and interacts correctly with human input and GUI.


Phase 5: Intermediate and advanced AI (heuristics + minimax)

Implement heuristic evaluation, depth-limited minimax and pruning for strong play.

  • Build heuristic scoring
  • Implement minimax
  • Add alpha-beta pruning

Functional Output: Medium and advanced AI levels play with progressively stronger, optimized strategies.


Phase 6: Game settings, persistence, undo/redo and polish

Add saving, loading, undo stack, statistics and UI refinements.

  • Store sessions/results
  • Implement undo/redo
  • Add visual/UX improvements

Functional Output: Configurable, persistent, polished app supporting all AI levels and enhanced usability features.