Java implementation of Battleships