8000 GitHub - RaGuL2k23/battleShip
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RaGuL2k23/battleShip

Repository files navigation

Battleship Game

Welcome to the Battleship Game! This is a classic naval combat game where you and your opponent take turns trying to sink each other's ships.

Table of Contents

Game Rules

  1. Objective: Sink all of your opponent's ships before they sink yours.
  2. Setup: Each player has a grid (10x10) on which they place their ships. Ships can be placed horizontally or vertically.
  3. Ships: Each player has the following ships:
    • 1 Carrier (5 spaces)
    • 1 Battleship (4 spaces)
    • 1 Cruiser (3 spaces)
    • 1 Submarine (3 spaces)
    • 1 Destroyer (2 spaces)
  4. Gameplay:
    • Players take turns guessing a location on their opponent's grid.
    • The opponent must announce whether the guess is a hit or a miss.
    • In the case of opponent computer will automatically play
    • If the guess is a hit, the opponent must also announce which ship was hit.
    • The game continues until all of one player's ships are sunk.

How to Play

  1. Setup the Board: Place your ships on your grid. Ensure they do not overlap and are within the grid boundaries.
  2. Start the Game: Decide who will go first.
  3. Take Turns: On your turn, announce a coordinate (e.g., "B5") to attack.
  4. Mark the Board: Mark hits and misses on your grid.
  5. End the Game: The game ends when all ships of one player are sunk. The player with remaining ships is the winner.

Features

  • Single-player mode against AI.
  • Multiplayer mode against another player.
  • Customizable grid size.
  • Save and load game functionality.
  • Visual representation of hits and misses.

Installation

To install and run the game, follow these steps:

  1. Clone the repository:
    git clone https://github.com/ragul2k23/battleship
  2. Run the html file and enjoy the game

Contribution

  1. If intrested add drag and drop option or any u like 💖

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0