title: How to move robot by the number entered by user?
body: <p><strong>I use drjava-stable-20120818-r5686 for coding</strong></p>
  
  <pre><code>    class Assignment2
      {
       public static void main(String[] args)
           {
        World barney=new World(20,20);
        Robot bob=new Robot();
        barney.addBeeper(6,4);
        barney.add(bob,4,4,"north");
        System.out.println("1. Turn left from current direction.");
       System.out.println("2. Turn right from current direction.");
       System.out.print("Enter Choice: ");
       int choice=Console.readInt();
  
       if(choice==1)
       {
       bob.turnLeft();
       }
       else
       {
       bob.turnLeft();
       bob.turnLeft();
       bob.turnLeft();
       }
  
       System.out.println("1. Move Forward Once.");
       System.out.println("2. Move Forward Twice.");
       System.out.println("3. Move Forward X Times.");
       System.out.println("Enter Choice: ");
       int choice2=Console.readInt();
       if(choice2==1)
       {
         bob.move();
       }
       if(choice2==2)
       {
          bob.move();
           bob.move();
       }
       else
       {
         System.out.println("Enter X: "); //dont know what to do next :(
      }
      [enter image description here][1]`
  </code></pre>
  
  <p>**Our teacher said to use loop(while) to do it, but I'm not really sure how
  **</p>