Skip to content

Sprint 1 User Stories

Austin edited this page Nov 3, 2018 · 1 revision

As a player, I want to chose where to place my ships so I can strategize and win

  • Ships will be distinguishable in open water.
  • Ships can be placed horizontally or vertically.
  • The board will be updated after every placement.
  1. Click on any ship.
  2. Place the ship anywhere on the board for strategy.
    1. Check that the ship placement is in a valid location.
    2. Check that placing the same ship will result in an error.
  3. Check the ship is displayed on the board.

As a player, I want to play against an AI that attacks me and places their ships in different places so that winning requires different inputs each time.

  • Enemy ships will not be be displayed on the board.
  • Enemy can attack the player at any location.
  • Attack will result in a miss or hit and will be displayed on the board
  1. Place player's ships.
  2. Begin the game by clicking on any square of the opponents board.
    1. Check that the attack was on a valid location.
    2. Check the result of the attack and if it is displayed on the board.
  3. Enemy will now do an attack.
    1. Checking is the same as step 2.
  4. Check it is the players turn to attack.
  5. After the game is done, reset, follow steps 1-2 and check that the enemy placed a ship in a different location.

As a developer, I would like for each ship to be its own class that inherits from the Ship class to make code easier to maintain,

  • Each ship will have its own characteristics such as its type of ship and size.
  1. Placing a ship will display its appropriate size
    1. Check for error placements with the size of the ship.
  2. Check each game board holds the values and locations of each ship.

As a developer, I would like to hold the contents of each player's ships and their coordinates so each player can attack one another.

  • Each ship will be held in an array, and in each ship it will have the coordinates of where they are located.
  • Each attack will be held in an array so that the board can display what was a hit and miss.
  1. Randomly place ships around the board.
    1. Check the coordinates of the ship are the same from what was clicked and what's held in the array.
  2. Randomly attack the opponents board.
    1. Check the coordinates of each attack are the same from what was clicked and what's held in the array.
    2. Check the board is showing the attacks and misses.
  3. Check that the game ends when all the ships on either side have been destroyed.

Clone this wiki locally