Skip to content

devmakarov/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ณ๏ธ Battleship โ€“ Multiplayer Game

A modern implementation of the classic Battleship game with drag-and-drop ship placement, random match mode, and the ability to play against your friend.
Built with React + TypeScript on the frontend and Node.js + WebSockets + Redis on the backend.


โœจ Features

  • ๐ŸŽฎ Drag & Drop Ships โ€“ intuitive ship placement using React DnD logic.
  • ๐Ÿค– Random Matchmaking โ€“ quickly find a random opponent to start playing.
  • ๐Ÿ‘ฅ Play with a Friend โ€“ share a room code and battle directly with a friend.
  • โšก Real-time Gameplay โ€“ powered by WebSockets for instant move updates.
  • ๐Ÿง  State Management โ€“ Redis is used to handle multiplayer sessions and game state.
  • ๐Ÿ“ฑ Responsive Design โ€“ optimized for both desktop and mobile play.

๐Ÿ›  Tech Stack

Frontend

  • React + TypeScript
  • React Router
  • Drag-and-Drop logic for ship placement

Backend

  • Node.js + TypeScript
  • WebSockets (real-time communication)
  • Redis (session & game state storage)

Other

  • Prisma + PostgreSQL (optional, for persistence if needed)
  • Docker (for local development setup)

๐Ÿš€ Getting Started

1. Clone the repository

git clone https://github.com/yourusername/battleship.git
cd battleship

2. Install dependencies

cd frontend
npm install

cd backend
npm install

3. Run with Docker (recommended)

cd frontend
npm run dev

cd backend
docker-compose up --build

This will start:

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages