Breakout clone in Java