Skip to content

gabasaura/reactjs-battleship

Repository files navigation

Battleship Game

A Battleship game developed in React js.
Based on this JS Vanilla 🔗 Repository

Table of Contents

Features

  • 10x10 game board for both player and CPU.
  • Draggable ships for easy placement.
  • Basic CPU opponent with random ship placement and targeting.
  • Simple and intuitive UI.

Usage

  • Drag and drop the ships onto the player board to position them.
  • Click on the CPU board to attack.
  • The game will alternate turns between the player and CPU until all ships of one side are sunk.

Game Rules

  • The game board is a 10x10 grid.
  • Each player (you and the CPU) has 5 ships of varying lengths:
    • Amarillo (1 squares)
    • Lila (2 squares)
    • Indigo (3 squares)
    • Ceruleo (3 squares)
    • Naranja (5 squares)
  • Ships can only be placed horizontally.
  • Players take turns attacking by selecting a square on the opponent's board.
  • 🏆 The first player to sink all opponent ships wins.

Testing installation

npm install
npm run dev
 ____  _  _   __   __ _  __ _  ____ 
(_  _)/ )( \ / _\ (  ( \(  / )/ ___)
  )(  ) __ (/    \/    / )  ( \___ \
 (__) \_)(_/\_/\_/\_)__)(__\_)(____/

About

Upgrade Battleship in ReactJS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published