A real-time 3-player battleship game, built with React and Socket.IO.
- Each player has a 7x7 board on which the player is able to place 5 ships:
- • A Carrier, which is 5 tiles long
- • A Battleship, which is 4 tiles long
- • A Cruiser, which is 3 tiles long
- • A Submarine, which is 3 tiles long
- • A Destroyer, which is 2 tiles long
- Each ship can be placed either horizontally or vertically on the board, and cannot be placed partially off the board.
- Each player then takes turns picking a tile on the opposing player’s grid, taking a shot at that tile.
- The Battle Grid identifies a miss with white, a hit with red, and a sunken ship with black.
- You can not hit the same spot twice.
- The player with the most ships remaining wins!
In single player mode you will be playing against two computers.
- • Clone this project to your computer
- • cd to the folder where this project is cloned.
- • Install all dependencies with npm install command.
- • Install React Confetti with npm install react-confetti comman in the client folder.
- • Run the Socket.IO server with npm run command on the server and client folder.
- • Run the app in the development mode with npm start command.
- • Open the broswer and visit: http://localhost:3000