Nearly working game of battleship