aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-22 20:07:32 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-22 20:07:32 +0100
commit936f0109093d2f75408e87a5b6d0492af097164f (patch)
tree4bcb9190df4df479765f4189950c9a388327cad3
parent7c437e1e39f73517b458aa72f9754e165f572969 (diff)
Let robot die on move with !mobile, instead of assert
-rw-r--r--world.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/world.cpp b/world.cpp
index 0a3c2ff..ff13d46 100644
--- a/world.cpp
+++ b/world.cpp
@@ -176,7 +176,7 @@ WorldAction Robot::execute(Instruction &ins,World &world){
return WorldAction::die;
case ins_t::move:
- assert(mobile);
+ if(!mobile)return WorldAction::die;
if(world.targetbot(this)==nullptr){
action=WorldAction::move;
}