/** GamePlayer.java uses a do loop to play a game.
 * @author Joel Adams, for Alice+Java.
 */
import java.util.Scanner;

public class GameController {
	public static void main(String[] args) {
		Scanner kbd = new Scanner(System.in);
		GuessingGame aGame = new GuessingGame();
		System.out.println("I'll think of a number between 1 and 100;"
				          + "\n see how long it takes you to guess it.");
		char answer;
		do {
			aGame.play();
			System.out.print("\nDo you want to play again (y or n)? ");
			answer = kbd.next().charAt(0);
		} while (answer == 'y' || answer == 'Y');
	}
}
