Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 1.22 KB

README.md

File metadata and controls

24 lines (22 loc) · 1.22 KB

battleship.js

Scrutinizer Code Quality Build Status License: MIT

Description

A simple Battleship game wrote in JavaScript.

Rules

  1. There are 5 types of boats and 7 boats in total:

    Game.numBoatTypes = 5;
    Game.numBoatsPerType = [0, 2, 2, 1, 1, 1];
    1. 2 boats occupying 1 cell
    2. 2 boats occupying 2 cells
    3. 1 boat occupying 3 cells
    4. 1 boat occupying 4 cells
    5. 1 boat occupying 5 cells
  2. Boats have to be placed horizontally or vertically

  3. Boats cannot be placed outside the 10x10 grid

  4. Boats cannot be placed on another boat or around it (every boat has to be distanced one cell from the rest of the boats)

Built with

Play

Click here to play