Added verbosity flag

This commit is contained in:
7u83 2018-12-19 18:18:11 +01:00
parent 2e269b42d8
commit 89bd269b5e

View File

@ -53,7 +53,15 @@ public abstract class AbstractTrader implements Trader {
this.world = world; this.world = world;
} }
private boolean verbose=false;
public boolean isVerbose() {
return verbose;
}
public void setVerbose(boolean verbose) {
this.verbose = verbose;
}
/** /**
@ -64,11 +72,16 @@ public abstract class AbstractTrader implements Trader {
return status; return status;
} }
/** /**
* @param status the status to set * @param status the status to set
*/ */
protected void setStatus(String status) { protected void setStatus(String status) {
this.status = status; this.status = status;
if (verbose){
System.out.printf("%s: %s\n",this.getName(),this.getStatus());
}
} }
/** /**