This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const GRID_SIZE = 10; | |
const SHIP_SIZES = [5, 4, 4]; | |
const board = new Array(GRID_SIZE).fill(null).map(() => new Array(GRID_SIZE).fill(0)); | |
const hits = new Array(GRID_SIZE).fill(null).map(() => new Array(GRID_SIZE).fill(false)); | |
// Let's place the ships on the board |