#ifndef ASTERISK_H #define ASTERISK_H #include "ofMain.h" #include "ofxNetwork.h" #define ASTERISK_IDLE 0 #define ASTERISK_WAITING 1 #define ASTERISK_STARTING 2 #define ASTERISK_PLAYING 3 #define ASTERISK_GAMESTARTED 1000 #define ASTERISK_GAMEOVER 1001 class Asterisk: public ofThread { public: Asterisk(){ } void start(){ } void stop(){ stopThread(); } //-------------------------- void setup(string passcode="1111",int millis=1000); virtual ~Asterisk(); void startGame(); void endGame(string score); int getUpdateTime(); int update(); int state; int queued; protected: void cmd(string s); void scmd(string s); void threadedFunction(); private: int startTime; FILE *file; int filenum; ofxUDPManager udpConnection; string playerCode; int statusPollMillis; int cmdtime; }; #endif // ASTERISK_H