Created
September 1, 2017 21:28
-
-
Save aurora-anon/ad19564c9bfb165edf7c38329cb7f4a9 to your computer and use it in GitHub Desktop.
Killing a target with a recursive method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Killer { | |
private Killer { | |
} | |
protected static void kill() { | |
if (killed) { | |
robot.speak("Target Killed"); | |
} | |
else { | |
robot.shoot(); | |
robot.kill(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment