00001 #include "AntEvalOp.h" 00002 00003 00008 class MoveAhead : public Tree::Primitives::Primitive 00009 { 00010 public: 00011 MoveAhead() 00012 { 00013 nArguments_ = 0; 00014 name_ = "move"; 00015 } 00016 00017 void execute(void* evalOp, Tree::Tree& tree) 00018 { 00019 // get pointer to simulator from the context 00020 AntEvalOp* ant = (AntEvalOp*) state_->getContext()->environment; 00021 ant->moveAhead(); 00022 } 00023 00024 ~MoveAhead() 00025 { } 00026 };