Skip to content

jsspiegel/completed-battleship-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Completed Battleship Lab Welcome to Battleship! This version works a bit differently: instead of having 5 ships of varying length randomly placed across the board, there are 3 "clusters" of ships, with each ship taking up one space on the board. But it's not finished yet! Here's what you need to do:

Track the number of ships remaining, and show that number in the appropriate spot on the webpage.

Make it so that the player has 25 shots to start with, and they lose a shot every time they fire. Remove the ability to fire when the player is out of ammo, show the number of shots remaining in the appropriate spot on the webpage.

When the "Fire" button is clicked, check if they hit the ship they specified. The row should be input as a number between 0 and 7, and the column as a letter between A and H. If it's a hit, change the emoji to 💣. If it's a miss, change the emoji to 🙅.

When you win, have the text "You win, click to play again" pop up, and have the page refresh when you click the link. Do the same thing for a loss.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published