Core game logic for classic game Battleship