-
Notifications
You must be signed in to change notification settings - Fork 0
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.
- Click on any ship.
- Place the ship anywhere on the board for strategy.
- Check that the ship placement is in a valid location.
- Check that placing the same ship will result in an error.
- 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
- Place player's ships.
- Begin the game by clicking on any square of the opponents board.
- Check that the attack was on a valid location.
- Check the result of the attack and if it is displayed on the board.
- Enemy will now do an attack.
- Checking is the same as step 2.
- Check it is the players turn to attack.
- 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.
- Placing a ship will display its appropriate size
- Check for error placements with the size of the ship.
- 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.
- Randomly place ships around the board.
- Check the coordinates of the ship are the same from what was clicked and what's held in the array.
- Randomly attack the opponents board.
- Check the coordinates of each attack are the same from what was clicked and what's held in the array.
- Check the board is showing the attacks and misses.
- Check that the game ends when all the ships on either side have been destroyed.