Skip to content

CodingMiner/battleship-game

Repository files navigation

🚢 Battleship Game

A classic battleship game built with React, TypeScript, styled-components and Vite.

🔗 Live demo: https://codingminer.github.io/battleship-game/

✨ Features

  • 🎯 Practice Mode — Find and sink all hidden ships on the board
  • ⚔️ Battle Mode — Place your ships and battle against a computer AI
  • 🤖 Three AI difficulty levels (easy, medium, hard)
  • 🖱️ Drag and drop ship placement with auto-place option
  • 📱 Responsive design across mobile, tablet and desktop

🚀 Getting Started

Prerequisites

  • 📦 Node.js 18+ and npm

Install and run

npm install
npm run dev

Open http://localhost:5173 in your browser.

🏗️ Build for production

npm run build

🧪 Run tests

npm run test:run        # unit tests, run once
npm run test            # unit tests, watch mode

🛠️ Tech Stack

  • ⚛️ React 19
  • 📘 TypeScript
  • 💅 styled-components
  • ⚡ Vite
  • 🧪 Vitest

About

Battleship game with practice and battle modes built with React, TypeScript and styled-components.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages