#ifndef GAME_STATE_H #define GAME_STATE_H #include "astbranch.h" #include "variable.h" #include "scope.h" class Game; class GameState { public: GameState( Game *pGame ); virtual ~GameState(); void parse( class AstBranch *pAst ); Variable pop() { return lStack.peekPop(); } void push( const Variable &v ) { lStack.push( v ); } void callFunction( const Bu::String &sName ); private: void parse( const AstBranch::NodeList &lCode ); private: typedef Bu::List ScopeList; typedef Bu::Hash ScopeHash; Game *pGame; Scope sGlobal; ScopeList lsLocal; ScopeHash hsSituation; VariableList lStack; }; #endif