Giter Site home page Giter Site logo

zeeshan-2k1 / battleship Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.03 MB

A 2-Player real time online board game

Home Page: https://battleship-liart.vercel.app

License: Other

JavaScript 0.79% HTML 3.26% TypeScript 89.82% CSS 6.13%
game reactjs socket-io typescript

battleship's Introduction

Battleship

Battleship is a web-based replica of the classic board game where players engage in real-time battles against each other. It's a 2-player game where participants strategically place their ships, namely Carrier, Battleship, Cruiser, Submarine, and Destroyer, each with varying health levels. The objective is to sink all the opponent's ships before they sink yours.

Battleship Rule Set

Battleship is a classic board game adapted into a web-based, real-time 2-player game. The following rule set outlines the gameplay mechanics and guidelines for Battleship:

Objective:

  • The objective of Battleship is to sink all of your opponent's ships before they sink yours.

Game Setup:

  1. Ships : Each player has the following ships:
  • Carrier (5 squares)
  • Battleship (4 squares)
  • Cruiser (3 squares)
  • Submarine (3 squares)
  • Destroyer (2 squares)
  1. Board : The game is played on a 11x11 grid.
  2. Placement : Players take turns placing their ships on their respective boards without overlapping or extending beyond the boundaries of the grid.

Gameplay:

  1. Turns : Players take alternate turns to attack each other's ships.
  2. Attacks : On each turn, a player selects a square on the opponent's grid to attack. The opponent must announce whether the attack is a hit or a miss.
  • If the attack hits a ship, the player marks the square as a hit.
  • If the attack misses all ships, the player marks the square as a miss.
  1. Sinking Ships : When all squares of a ship are hit, the ship is considered sunk.
  2. Announcing Hits and Misses : Players must announce whether an attack hits or misses the opponent's ships to maintain fair gameplay.

Winning the Game:

  • The game continues until one player successfully sinks all of their opponent's ships.
  • The player who sinks all of their opponent's ships first is declared the winner.

End of Game:

  • Once a winner is determined, the game concludes, and players can start a new game if desired.

Rule Enforcement:

  • Players must adhere to the rules outlined above to maintain fair gameplay.
  • Any violations or disputes should be resolved amicably between the players.

Have Fun!

Battleship is a game of strategy, skill, and anticipation. Enjoy the challenge of outsmarting your opponent and sinking their ships while protecting your own. May the best strategist win!

battleship's People

Contributors

zeeshan-2k1 avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.