Battleship game on pure JS