Battleship is a web implementation of the traditional two-player strategy game. Since it is a Progressive Web Application it can be installed to home screens on mobile devices and can be played offline once it is installed.
- The player places 5 ships on their board.
- The ships available to the player have the following unit sizes: 5, 4, 3, 3, 2
- After the player places their ships on the board, they take turns with computer to attack each other.
- The goal is to sink all of the opponent's ships before they sink yours.
- In its current state, page needs to be refreshed to start a new game
- Computer attack is deliberately slowed down to respond after 0.35 - 0.8 seconds to make it seem more natural instead of getting an instant attack after player plays their turn.
- The times are defined as
minResponseTime
andmaxResponseTime
attribute ofcomputer
object, which can be changed in theindex.js
.
- The times are defined as