techcsispit / Battleship-Game-JS

This is a Battleship Game built using HTML, CSS, and JavaScript. It simulates the classic battleship experience where players take turns guessing the location of their opponent’s ships.
0 stars 3 forks source link

Game Doesn't End After Sinking All Ships #2

Closed Dash10107 closed 2 weeks ago

Dash10107 commented 2 weeks ago

Problem: After all the opponent's ships are sunk, the game continues instead of ending, leading to an unresolved game state.

image

Steps to Reproduce: Play the game until all ships are sunk. Observe that the game does not end and continues despite no ships being left.

Expected Behavior: The game should end and display the result as soon as all ships are sunk.

Suggested Fix: Add a game-over condition that triggers when all ships are sunk, ending the game and displaying a victory or defeat message.

Dash10107 commented 2 weeks ago

I would like to work on this issue