X-Git-Url: https://ruin.nu/git/?p=popboot.git;a=blobdiff_plain;f=action.cpp;h=6e4b60785917cf7627c7ef1969b9621481c40022;hp=87947ca054bb6684bfe9e23e006a16ff94df7c6c;hb=fdcf46671ca1dab0dadb490bb4375dc3dd2fc9a4;hpb=41efed0d6ee664fb79ea21a0e7239edcf51926d8 diff --git a/action.cpp b/action.cpp index 87947ca..6e4b607 100644 --- a/action.cpp +++ b/action.cpp @@ -1,4 +1,5 @@ #include "action.h" +#include #include using namespace std; using namespace __gnu_cxx; @@ -16,6 +17,7 @@ Action::Action(const Action& action){ _name = action._name; _preconditions = action._preconditions; _effects = action._effects; + _executable = action._executable; } const Literals& Action::effects(int value) const{ @@ -30,8 +32,8 @@ const Preconditions& Action::preconditions() const{ } int Action::execute() const{ - cout << "Executing: " << _executable << endl; - return 0; + cout << "Executing: " << _name << endl; + return system(_executable.c_str()); } const string& Action::name() const{