Skip to content

Commit

Permalink
#6 commeted code snippets deleted from Plumber.java
Browse files Browse the repository at this point in the history
  • Loading branch information
pupcs committed May 20, 2024
1 parent e2eee71 commit 455a5ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions src/main/java/program/main/Plumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public void repair(Field f) {
if (this.getCooldown() <= 0) {
if (this.getPosition().getConnectedPipes().contains(f) || this.getPosition().equals(f)) {
f.repair();
//System.out.println("SUCCESS - Plumber.repair()");
// this.done = true;
this.cooldown = Controller.getNomadCoolDown();
}
}
Expand All @@ -60,14 +58,12 @@ public void pickUpPump() {
if (!egyezik) {
Pump p = new Pump("pump" + counter, LoadSave.PUMP_WORKING_EMPTY);
this.setPumpInPocket(p);
//this.done = true;
//System.out.println("SUCCESS - Plumber.pickUpPump()");
break;
}
}
}
} catch (Exception e) {
//System.out.println();

}
}

Expand All @@ -81,11 +77,7 @@ public void pickUpPipe(Pipe p) {
this.setPipeInPocket(p);
this.getPosition().removePipe(p);
p.pickedUp(this);
//this.done = true;
//System.out.println("SUCCESS - Plumber.pickUpPipe()");
} else {
//System.out.println("FAILED - The pipe is not connected to the pump!");
}
}
}

/**
Expand Down Expand Up @@ -125,14 +117,8 @@ public void placePump(Pipe p) {
if (this.getPosition().getConnectedPipes().contains(p)) {
p.placePump(this.getPumpInPocket());
this.setPumpInPocket(null);
//this.done = true;
//System.out.println("SUCCESS - Plumber.placePump()");
} else {
//System.out.println("FAILED - The pipe is not connected to the pump!");
}
} else {
//System.out.println("FAILED - There is no pump in the pocket!");
}
};
};
}

/**
Expand All @@ -143,8 +129,6 @@ public void placePipe() {
this.getPosition().connectPipe(this.getPipeInPocket());
this.getPipeInPocket().placedDown();
this.setPipeInPocket(null);
//this.done = true;
//System.out.println("SUCCESS - Plumber.placePipe()");
}
}

Expand All @@ -155,7 +139,6 @@ public void placePipe() {
*/
public void setPipeInPocket(Pipe p) {
pipeInPocket = p;
//System.out.println("SUCCESS - Plumber.setPipeInPocket()");
}

/**
Expand All @@ -165,7 +148,6 @@ public void setPipeInPocket(Pipe p) {
*/
public void setPumpInPocket(Pump pump) {
pumpInPocket = pump;
//System.out.println("SUCCESS - Plumber.setPumpInPocket()");
}

/**
Expand All @@ -175,9 +157,6 @@ public void turn() {

this.decreaseCooldown();
this.decreaseStuckTimeLeft();
//System.out.println("SUCCESS - Plumber.turn()");


}

/**
Expand All @@ -186,7 +165,6 @@ public void turn() {
* @return
*/
public Pump getPumpInPocket() {
//System.out.println("SUCCESS - Plumber.getPumpInPocket()");
return pumpInPocket;
}

Expand All @@ -196,7 +174,6 @@ public Pump getPumpInPocket() {
* @return
*/
public Pipe getPipeInPocket() {
//System.out.println("SUCCESS - Plumber.getPipeInPocket()");
return pipeInPocket;
}

Expand Down
Binary file modified target/classes/program/main/Plumber.class
Binary file not shown.

0 comments on commit 455a5ed

Please sign in to comment.