diff options
-rw-r--r-- | src/commandset.cpp | 6 | ||||
-rw-r--r-- | src/commandset.h | 1 | ||||
-rw-r--r-- | src/situation.cpp | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/commandset.cpp b/src/commandset.cpp index a125541..c2231d5 100644 --- a/src/commandset.cpp +++ b/src/commandset.cpp | |||
@@ -36,3 +36,9 @@ bool CommandSet::dispatch( class GameState &gState, const Bu::StringList &lCmd ) | |||
36 | return false; | 36 | return false; |
37 | } | 37 | } |
38 | 38 | ||
39 | void CommandSet::exec( class GameState &gState, int idx ) | ||
40 | { | ||
41 | CommandList::iterator i = lCommand.begin()+idx; | ||
42 | (*i)->exec( gState, Bu::StringList() ); | ||
43 | } | ||
44 | |||
diff --git a/src/commandset.h b/src/commandset.h index aff2e4c..d7094f0 100644 --- a/src/commandset.h +++ b/src/commandset.h | |||
@@ -13,6 +13,7 @@ public: | |||
13 | void addCommand( class Command *pCmd ); | 13 | void addCommand( class Command *pCmd ); |
14 | 14 | ||
15 | bool dispatch( class GameState &gState, const Bu::StringList &lCmd ); | 15 | bool dispatch( class GameState &gState, const Bu::StringList &lCmd ); |
16 | void exec( class GameState &gState, int idx ); | ||
16 | 17 | ||
17 | typedef Bu::List<class Command *> CommandList; | 18 | typedef Bu::List<class Command *> CommandList; |
18 | const CommandList &getCommandList() const { return lCommand; } | 19 | const CommandList &getCommandList() const { return lCommand; } |
diff --git a/src/situation.cpp b/src/situation.cpp index 54096cc..923eea7 100644 --- a/src/situation.cpp +++ b/src/situation.cpp | |||
@@ -62,6 +62,7 @@ bool Situation::execCommand( class GameState &gState, | |||
62 | 62 | ||
63 | void Situation::execOption( class GameState &gState, int idx ) | 63 | void Situation::execOption( class GameState &gState, int idx ) |
64 | { | 64 | { |
65 | csLocal.exec( gState, idx ); | ||
65 | } | 66 | } |
66 | 67 | ||
67 | Bu::Formatter &operator<<( Bu::Formatter &f, Situation::Mode m ) | 68 | Bu::Formatter &operator<<( Bu::Formatter &f, Situation::Mode m ) |