Battleships object in JS - class