BagOfBalls bagOfBalls = (BagOfBalls)(new RandomBag());
while (ringMaster.gameInProgress()) {
if (!ringMaster.isCheckingForWinner()) {
try {
ringMaster.announceBall(bagOfBalls.getNext());
} catch (NoMoreBallsException e) {
ringMaster.setGameOver();
}
}
try {
wait(ringMaster.getGameParameters().getDelay());
} catch (InterruptedException e) { }
}