import java.io.*;
public class GetAWish {

    /* Implement main to do the following:
     *
     * Ask the user the question:
     * Do you want a motorcycle?
     * Get a response from the user. 
     *
     * Ask the user the question:
     * Do you want a car?
     * Get a response from the user.
     *
     * Consider a response that starts with Y or y to mean yes.
     * 
     * Then tell the user:
     * You are about to be JUDGED!
     *
     * Use the method waitForGo to wait for when the user is ready.
     * Using a Wish object, tell the user the judgement of their wishes.
     */
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(
                                 new InputStreamReader(
                                      System.in));

        System.out.println("Do you want a motorcycle?");
        System.out.flush();
        boolean wantsMotorcycle = Interactions.isAffirmative(
                                      br.readLine());

        System.out.println("Do you want a car?");
        System.out.flush();
        boolean wantsCar = Interactions.isAffirmative(
                               br.readLine());

        System.out.println("You are about to be JUDGED!");
        Interactions.waitForGo(br);
        System.out.println(
            (new Wish(wantsCar, wantsMotorcycle)).judgement());
    }
  
}
