Rules

Game Overview

Battleship is a strategic two-player game where the objective is to sink all of your opponent's ships before they sink yours. Played on a 10×10 grid, players take turns guessing coordinates to locate and destroy enemy ships.

Game Setup

Grid: The game is played on a 10×10 grid, with coordinates ranging from (0,0) to (9,9).

Ship Types and Sizes:

  • Carrier: 5 cells
  • Battleship: 4 cells
  • Cruiser: 3 cells
  • Submarine: 3 cells
  • Destroyer: 2 cells

Placement Rules: Each player must place one of each ship type on their grid. Ships can be placed horizontally or vertically, but they cannot overlap, extend beyond the grid, or be placed diagonally. Players can place ships manually by clicking cells or use the random placement option.

Gameplay

Turns: Players alternate turns. On your turn, click a cell on the opponent's grid to select your attack target (highlighted with ⚪). Confirm your attack by clicking 'Hand Over Turn' to register the result.

Attack Results:

  • Hit: 🔴 explosion - Indicates a ship was struck. If all cells of a ship are hit, it sinks.
  • Miss: 🌊 splash - Indicates no ship was present at the targeted cell.
  • Sink: 🚢 sinking - Occurs when all cells of a ship are hit, marked with a sinking animation.

Turn Confirmation: Attacks are only finalized when you click 'Hand Over Turn'. You can change your target by clicking another cell before confirming.

Winning the Game

Objective: The game ends when one player sinks all five of their opponent's ships. The last player to sink a ship is declared the winner.

Scoring: Tracks total moves and hit accuracy (percentage of hits out of total moves), displayed on the game over screen.

Additional Rules

Single Placement: Each ship type can only be placed once per player.

No Repeats: Once a cell is attacked (hit or miss), it cannot be targeted again.

Fair Play: Players should not reveal their ship placements to the opponent during the game.