@ -22,83 +22,53 @@ BGE is responsible for maintaining game state.
### BGE
### BGE
- [ ] Caller can invoke a `startGame()` function to begin a 1-player game. This
- [ ] Caller can invoke a `startGame()` function to begin a 1-player game. This function will generate an 8x8 game board consisting of 3 ships having a width of one square and a length of:
function will generate an 8x8 game board consisting of 3 ships having a width of
one square and a length of:
- Destroyer: 2 squares
* Destroyer: 2 squares
- Cruiser: 3 squares
* Cruiser: 3 squares
- Battleship: 4 squares
* Battleship: 4 squares
`startGame()` will randomly place these ships on the board in any direction and will return an array representing ship placement.
`startGame()` will randomly place these ships on the board in any direction
and will return an array representing ship placement.
- [ ] Caller can invoke a `shoot()` function passing the target row and column coordinates of the targeted cell on the game board. `shoot()` will return indicators representing if the shot resulted in a hit or miss, the number of ships left (i.e. not yet sunk), the ship placement array, and an updated hits and misses array.
- [ ] Caller can invoke a `shoot()` function passing the target row and column
coordinates of the targeted cell on the game board. `shoot()` will return
Cells in the hits and misses array will contain a space if they have yet to be targeted, `O` if they were targeted but no part of a ship was at that location, or `X` if the cell was occupied by part of a ship.
indicators representing if the shot resulted in a hit or miss, the number of
ships left (i.e. not yet sunk), the ship placement array, and an updated hits
and misses array.
Cells in the hits and misses array will contain a space if they have yet
to be targeted, `O` if they were targeted but no part of a ship was at that
location, or `X` if the cell was occupied by part of a ship.
### Text-based Presentation Layer
### Text-based Presentation Layer
- [ ] User can see the hits and misses array displayed as a 2 dimensional
- [ ] User can see the hits and misses array displayed as a 2 dimensional character representation of the game board returned by the `startGame()` function.
character represention of the game board returned by the `startGame()` function.
- [ ] User can be prompted to enter the coordinates of a target square on the game board.
- [ ] User can be promted to enter the coordinates of a target square on the
- [ ] User can see an updated hits and misses array display after taking a shot.
game board.
- [ ] User can see a message after each shot indicating whether the shot resulted in a hit or miss.
- [ ] User can see an updated hits and misses array display after taking a
- [ ] User can see an congratulations message after the shot that sinks the last remaining ship.
shot.
- [ ] User can be prompted to play again at the end of each game. Declining to play again stops the game.
- [ ] User can see a message after each shot indicating whether the shot
resulted in a hit or miss.
- [ ] User can see an congratulations message after the shot that sinks the
last remaining ship.
- [ ] User can be prompted to play again at the end of each game. Declining
to play again stops the game.
## Bonus features
## Bonus features
### BGE
### BGE
- [ ] Caller can specify the number of rows and columns in the game board as
- [ ] Caller can specify the number of rows and columns in the game board as a parameter to the `startGame()` function.
a parameter to the `startGame()` function.
- [ ] Caller can invoke a `gameStats()` function that returns a Javascript object containing metrics for the current game. For example, number of turns played, current number of hits and misses, etc.
- [ ] Caller can invoke a `gameStats()` function that returns a Javascript
- [ ] Caller can specify the number of players (1 or 2) when calling `startGame()` which will generate one board for each player randomly populated with ships.
object containing metrics for the current game. For example, number of turns
played, current number of hits and misses, etc.
- [ ] Caller can specify the number of players (1 or 2) when calling
`startGame()` which will generate one board for each player randomly populated
with ships.
`shoot()` will accept the player number the shot is being made for along with
`shoot()` will accept the player number the shot is being made for along with the coordinates of the shot. The data it returns will be for that player.
the coordinates of the shot. The data it returns will be for that player.
### Text-based Presentation Layer
### Text-based Presentation Layer
- [ ] User can see the current game statics at any point by entering the
- [ ] User can see the current game statics at any point by entering the phrase `stats` in place of target coordinates. (Note that this requires the `gameStats()` function in the BGE)
phrase `stats` in place of target coordinates. (Note that this requires
- [ ] User can specify a two player game is to be played, with each player alternating turns in the same terminal session (Note that this requires corresponding Bonus Features in the BGE)
the `gameStats()` function in the BGE)
- [ ] User can see the player number in prompts associated with the inputs in each turn.
- [ ] User can specify a two player game is to be played, with each player
alternating turns in the same terminal session (Note that this requires
cooresponding Bonus Features in the BGE)
- [ ] User can see the player number in prompts associated with the inputs in
each turn.
- [ ] User can see both players boards at the end of each turn.
- [ ] User can see both players boards at the end of each turn.
## Project Board
You can track your progress by cloning this [TBD](url-goes-here)
## Useful links and resources
## Useful links and resources
- [Battleship Game (Wikipedia)](https://en.wikipedia.org/wiki/Battleship_(game))
- [Battleship Game (Wikipedia)](<https://en.wikipedia.org/wiki/Battleship_(game)>)
- [Battleship Game Rules (Hasbro)](https://www.hasbro.com/common/instruct/battleship.pdf)
- [Battleship Game Rules (Hasbro)](https://www.hasbro.com/common/instruct/battleship.pdf)
## Example projects
## Example projects
This YouTube video shows how a text-based
This YouTube video shows how a text-based [Battleship Game](https://www.youtube.com/watch?v=TKksu3JXTTM) is played.
[Battleship Game](https://www.youtube.com/watch?v=TKksu3JXTTM) is played.
The following example is provided as a demonstration of the Battleship game if it is unfamiliar to you. Remember you are to implement a text based presentation layer for testing.
The following example is provided as a demonstration of the Battleship game
- [Battleship Game by Chris Brody](https://codepen.io/CodifyAcademy/pen/ByBEOz)
if it is unfamiliar to you. Remember you are to implement a text based
presentation layer for testing.
[Battleship Game by Chris Brody](https://codepen.io/CodifyAcademy/pen/ByBEOz)
@ -21,10 +21,6 @@ When the User clicks on the 2nd card:
- [ ] Use can choose between multiple levels of difficulty (Easy, Medium, Hard). Increased difficulty means: decreasing the time available to complete and/or increasing the number of cards
- [ ] Use can choose between multiple levels of difficulty (Easy, Medium, Hard). Increased difficulty means: decreasing the time available to complete and/or increasing the number of cards
- [ ] User can see the game statistics (nr. of times he won / he lost, best time for each level)
- [ ] User can see the game statistics (nr. of times he won / he lost, best time for each level)
## Project Board
You can track your progress by cloning this [TBD](url-goes-here)
@ -32,10 +32,6 @@ efforts and to make it available through a simple Slack command.
- [ ] User may list the individual having the most kudos, in descending order, user the Slack command: `/kudo top <n>` where `n` is an integer or `*` for all individuals who have received a kudo
- [ ] User may list the individual having the most kudos, in descending order, user the Slack command: `/kudo top <n>` where `n` is an integer or `*` for all individuals who have received a kudo
## Trello Board
You can track your progress by cloning this [Trello Board](https://trello.com/b/bYzRZwIw/kudos-slackbot)
@ -15,10 +15,6 @@ Convert Github flavored markdown into HTML code.
- [ ] When closing the browser window the markdown formatted text will be stored in `localStorage` and when the User returns, the data will be retrieved and displayed
- [ ] When closing the browser window the markdown formatted text will be stored in `localStorage` and when the User returns, the data will be retrieved and displayed
- [ ] User can click a button and the content of the box is saved to the `clipboard`
- [ ] User can click a button and the content of the box is saved to the `clipboard`
## Trello Board
You can track your progress by cloning this [Trello Board](https://trello.com/b/LfE51Ff6/markdown-previewer)
- [ ] User will be prompted to enter new data values if `Calculate` is pressed without first changing at least one of the input fields
- [ ] User will be prompted to enter new data values if `Calculate` is pressed without first changing at least one of the input fields
- [ ] User will see an updated wind chill factor whenever new actual temperature or wind speed values are entered, without being required to click the `Calculate` button
- [ ] User will see an updated wind chill factor whenever new actual temperature or wind speed values are entered, without being required to click the `Calculate` button
## Trello Board
You can track your progress by cloning this [Trello Board](https://trello.com/b/qyxlrbMU/windchill)