From 936f0109093d2f75408e87a5b6d0492af097164f Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 22 Mar 2017 20:07:32 +0100 Subject: Let robot die on move with !mobile, instead of assert --- world.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2