Skip to content

[US-04] Single-player mode vs. computer opponent

Ivan Esau requested to merge feature/issue-4-us-04-single-player-mode-vs-co into master

As a player I want to play against a computer opponent So that I can play solo.

The system shall:

  1. Offer Single-Player: the computer places a legal fleet (no overlaps/out-of-bounds, standard sizes).
  2. On its turn, the computer shall select a valid untargeted coordinate and fire; at minimum it shall avoid repeats.
  3. Provide difficulty options: Easy (random shots) and Standard (after a hit, preferentially target adjacent cells until the ship is sunk).

Acceptance criteria (verifiable):

  • Given Single-Player is chosen, when the match starts, then the computer’s fleet exists and is legal but hidden.
  • Given the computer took a turn, when the history is inspected, then its shot is at a previously untargeted coordinate.
  • Given Standard difficulty and a computer hit, when subsequent computer turns occur, then at least one subsequent shot targets an adjacent cell until the ship is sunk.
Edited by Ivan Esau

Merge request reports

Loading