예제 #1
0
 public bool reserve(Barrel b)
 {
     if (whoIsUsingIt == null)
     {
         whoIsUsingIt = b;
         Debug.Print("b" + b.getBarrelNumber() + " reserved the air supply");
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #2
0
 public void free(Barrel b)
 {
     whoIsUsingIt = null;
     Debug.Print("b" + b.getBarrelNumber() + " freed the air supply");
 }