Skip to content

Battleship is a web implementation of the traditional two-player strategy game.

Notifications You must be signed in to change notification settings

yethranayeh/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship

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.

How to Play

  • 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.

App Limitations

  • 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 and maxResponseTime attribute of computer object, which can be changed in the index.js.

Credits