Added verbosity flag
This commit is contained in:
parent
2e269b42d8
commit
89bd269b5e
@ -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());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user