#include "functionkeys.h" #include "gamestate.h" #include using namespace Bu; FunctionKeys::FunctionKeys() { } FunctionKeys::~FunctionKeys() { } void FunctionKeys::call( class GameState &gState ) { Variable vDict = gState.popDeref(); if( vDict.getType() != Variable::tDictionary ) throw Bu::ExceptionBase("Parameter to keys must be a dictionary."); Variable vLst( Variable::tList ); for( Variable::VariableHash::const_iterator i = vDict.getHash().begin(); i; i++ ) { vLst += i.getKey(); } gState.push( vLst ); }