diff options
Diffstat (limited to 'world.cpp')
-rw-r--r-- | world.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -145,6 +145,7 @@ WorldAction Robot::execute(Instruction &ins,World &world){ break; case ins_t::trans:{ + assert(iset>=1); Robot *r=world.targetbot(this); if(r){ assert(ins.args[0].num>=1&&ins.args[0].num<=(int)banks.size()&& @@ -167,6 +168,7 @@ WorldAction Robot::execute(Instruction &ins,World &world){ return WorldAction::die; case ins_t::move: + assert(mobile); if(world.targetbot(this)==nullptr){ action=WorldAction::move; } @@ -178,6 +180,7 @@ WorldAction Robot::execute(Instruction &ins,World &world){ break; case ins_t::scan:{ + assert(iset>=1); Robot *r=world.targetbot(this); uint16_t *v=resolveVar(ins.args[0],world); if(!v)break; @@ -191,6 +194,7 @@ WorldAction Robot::execute(Instruction &ins,World &world){ } case ins_t::create: + assert(iset>=2); if(world.targetbot(this)!=nullptr)break; assert(ins.args[0].num>=0&&ins.args[0].num<=2); assert(ins.args[1].num>=0); |