00001 #include "AntEvalOp.h" 00002 00003 00008 class TurnLeft : public Tree::Primitives::Primitive 00009 { 00010 public: 00011 TurnLeft() 00012 { 00013 nArguments_ = 0; 00014 name_ = "left"; 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 // turn us left 00022 ant->turnLeft(); 00023 } 00024 00025 ~TurnLeft() 00026 { } 00027 };