Added verbosity flag
This commit is contained in:
parent
2e269b42d8
commit
89bd269b5e
@ -53,8 +53,16 @@ public abstract class AbstractTrader implements Trader {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
|
||||
private boolean verbose=false;
|
||||
|
||||
public boolean isVerbose() {
|
||||
return verbose;
|
||||
}
|
||||
|
||||
public void setVerbose(boolean verbose) {
|
||||
this.verbose = verbose;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the status
|
||||
@ -64,11 +72,16 @@ public abstract class AbstractTrader implements Trader {
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param status the status to set
|
||||
*/
|
||||
protected void setStatus(String status) {
|
||||
this.status = status;
|
||||
if (verbose){
|
||||
System.out.printf("%s: %s\n",this.getName(),this.getStatus());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user