Submarine simulator programmed in Java