Skip to content

Commit

Permalink
added responder last location check, avoid nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
sshaaf committed May 3, 2019
1 parent 7889d71 commit 49d20df
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,16 @@ else if (r.peek().isDestination())
// if human return false and skip this guy
public boolean humanMessageCheck(Responder r){
if(r.isHuman()){
if (r.peek().isWayPoint() || r.peek().isDestination()) {
if (r.peek().isWayPoint()) {
// eating one step
r.setContinue(false);
return false;
}
else if(r.peek().isDestination()){
r.setContinue(false);
r.setStatus(Responder.Status.DROPPED);
return false;
}
}


Expand Down

0 comments on commit 49d20df

Please sign in to comment.