yethranayeh / battleship

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

Home Page:https://yethranayeh.github.io/battleship

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

https://yethranayeh.github.io/battleship


Languages

Language:JavaScript 71.6%Language:CSS 28.4%