aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-14 19:50:12 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-14 19:50:12 +0100
commit1ad8073e792ec152120f785d0172e37c2f6c2a59 (patch)
tree33fe375261885b3da6009441b31257de55c8edc7
parent4a271518149cba9522172e408e57a0d75099388e (diff)
Add support for $Fields
-rw-r--r--world.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/world.cpp b/world.cpp
index 7f78253..5d82073 100644
--- a/world.cpp
+++ b/world.cpp
@@ -84,7 +84,13 @@ Instruction Robot::resolve(World &world){
break;
}
case arg_t::constant:
- assert(false);
+ assert(!arg.remote);
+ if(arg.name=="fields"){
+ arg.type=arg_t::number;
+ arg.num=SIZE;
+ } else assert(false);
+ break;
+
default:
assert(false);
}