A JavaScript implementation of Battleship