//Name:
//Date:
//Purpose:

public class RPG
{
    public static void main (String args[])
    {
	new RPG ();
    }


    public RPG ()
    {
	introduction ();
    }


    public void introduction ()
    {
	System.out.println ("This is the introduction");
	task1 ();
    }


    public void task1 ()
    {
	System.out.println ("\nThis is the task one.");

	int ans = IO.inputInt ("3+4? ");

	if (ans == 7)
	{
	    System.out.println ("Good job. You move on. ");
	    task2 ();
	}
	else
	{
	    System.out.println ("Try task one again. ");
	    task1 ();
	}
    }


    public void task2 ()
    {
	System.out.println ("\nThis is the task two.");
	int ans = IO.inputInt ("7+7? ");

	if (ans == 14)
	{
	    System.out.println ("Good job. You move on. ");
	    task3 ();
	}
	else
	{
	    System.out.println ("Try task two again. ");
	    task2 ();
	}
    }


    public void task3 ()
    {
	System.out.println ("\nThis is the task three.");
	int ans = IO.inputInt ("10+10? ");

	if (ans == 20)
	{
	    System.out.println ("Good job. You move on. ");
	    conclusion ();
	}
	else
	{
	    System.out.println ("Try task three again. ");
	    task3 ();
	}
    }


    public void conclusion ()
    {
	System.out.println ("\nYou have won the entire game. Well done.");
    }
}
