title: Is there a issue with my if statements in my object command?
body: <p>I'm new to OOP and I am making a fishing game. Right now I have a object called boat which can travel a certain distance depending on its fuel. However if it runs out of fuel and is in the middle of the ocean the game should end. My problem is that for some reason rather than ending the game since it is not in a landmark and fuel would be empty, it say's the boat traveled the certain distance.</p>
  
  <pre><code>public class Boat 
  {
      int fuelCapacity;
      int fuelLevel;
      int fishCapacity;
      int location;
  
     public Boat()
     {
         fuelCapacity=10;
         fuelLevel=10;
         fishCapacity=10;
         location=0;
     }
  
  
     public int getFuelCapacity()
     {
         return this.fuelCapacity;
     }
     public int getFuelLevel()
     {
         return this.fuelLevel;
     }
      public int getLocation()
     {
         return this.location;
     }
  
  
     //start the process of travel and determine what happens
      //// 
     public int Travel(int Fuel,int Location,int FuelCapacity) throws IOException
     {
          int FuelConsumed=0;
  
          //Enable IO
         BufferedReader MyInput=new BufferedReader (new InputStreamReader(System.in));
  
  
          System.out.println("How many meters do you want to travel");
          System.out.println("Please enter only in increments of 10m");
          System.out.println("Enter in negative number to go west");
          System.out.println("Please in positive number to go east");
          int distance=Integer.parseInt(MyInput.readLine());
  
  
          //if they go east
          if (distance&lt;0)
          {
              for (int x=0;x&lt;=(distance/10);x++)
              {
  
                  FuelConsumed++;
              }
          }
          //if they go west
          if (distance&gt;0)
          {
                  for (int x=0;x&lt;=((distance*(-1))/10);x++)
              {
  
                  FuelConsumed++;
              }
          }
  
          Location=Location+distance;
          int FuelLeft=Fuel-FuelConsumed;
  
  
          //Checks which sceanrio it falls under and gives apporpiate output
          if (FuelLeft==0 &amp;&amp; Location!=100) //End game
          {
              System.out.println("Oh No your stuck in the middle of ocean with no fuel");
              System.out.println("Hope you can survive the middle of ocean by youself");
              System.out.println("GAME OVER");
              distance=9999;
  
              return distance;
          }
           else if (FuelLeft==0 &amp;&amp; Location!=0) ///End game
          {
              System.out.println("Oh No your stuck in the middle of ocean with no fuel");
              System.out.println("Hope you can survive the middle of ocean by youself");
              System.out.println("GAME OVER");
              distance=9999;
  
              return distance;
          }
          else if (FuelLeft==0 &amp;&amp; Location!=200) ///End game
          {
              System.out.println("Oh No your stuck in the middle of ocean with no fuel");
              System.out.println("Hope you can survive the middle of ocean by youself");
              System.out.println("GAME OVER");
              distance=9999;
  
              return distance;
          }
          else if (FuelLeft==0 &amp;&amp; Location!=300) ///End game
          {
              System.out.println("Oh No your stuck in the middle of ocean with no fuel");
              System.out.println("Hope you can survive the middle of ocean by youself");
              System.out.println("GAME OVER");
              distance=9999;
  
              return distance;
          }
          else if (FuelLeft==0 &amp;&amp; Location!=400) //stuck in ocean
          {
              System.out.println("Oh No your stuck in the middle of ocean with no fuel");
              System.out.println("Hope you can survive the middle of ocean by youself");
              System.out.println("GAME OVER");
              distance=9999;
  
              return distance;
          }
  
  
  
  
          else if (Location&gt;400) //error catching (out of bounds)
          {
              System.out.println("You cant go out of bounds! Its restricted waters");
              distance=0;
  
             return distance;
          }
          else if (Location&lt;0) //error catching (out of bounds)
          {
              System.out.println("You cant go out of bounds! Its restricted waters");
              distance=0;
  
              return distance;
          }
  
  
  
  
          else if (FuelLeft&lt;(distance/10)) //error catching (trying togo father then the amount of fuel allows them too)
          {
              System.out.println("You dont have engough fuel to go there");
              return distance;
          }
          else if (FuelLeft&lt;((distance*(-1))/10)) //error catching (trying togo father then the amount of fuel allows them too)
          {
              System.out.println("You dont have engough fuel to go there");
              return distance;
          }
  
  
  
  
  
          else 
          {
              System.out.println("You travelled " + distance + "m");
              return distance;
          }
     }
     }
  
  </code></pre>
  
  <pre><code>Boat boat= new Boat();
  
  
          System.out.println("You have " +boat.getFuelLevel());
          System.out.println("1 fuel goes 10m ");
  
          System.out.println("The map");
          System.out.println("Legend:");
          System.out.println("- eligable fishing spot and is 10m each  ");
          System.out.println("# is a town");
          System.out.println("East: -&gt;");
          System.out.println("West: &lt;-");
  
  
  
  
          System.out.println("  1          2          3          4          5");
          System.out.println("  |----------|----------|----------|----------| ");
          System.out.println("  0m         100m       200m       300m       400m");
  
  
          boat.fuelLevel=5;
          boat.location=100;
          boat.fuelCapacity=10;
          boat.Travel(boat.getFuelLevel(), boat.getLocation(), boat.getFuelCapacity());
  
  </code></pre>