X-Git-Url: https://git.ralfj.de/multypo.git/blobdiff_plain/036922ba5e90ae7f6f6abe3f99b1783dec5132fc..318e322c3cd72e6a7f692c6f7c7770c0e15720c8:/qt/player.h?ds=sidebyside diff --git a/qt/player.h b/qt/player.h index f725069..3817866 100644 --- a/qt/player.h +++ b/qt/player.h @@ -6,13 +6,32 @@ class Player { -private: - QString name; - QString currentLine; - QLabel* theLabel; public: + enum State { + Naming, + Waiting, + Typing + }; + Player(QWidget* parent); + void handleKey(QString); + State getState() { return state; } + + void nextWord(); + QString getCurrentWord(); + void wordComplete(int points); + void showScore(); + +private: + int score; + QString name; + QString currentWord; + QLabel* theLabel; + + State state; + + void updateLabel(); }; #endif // PLAYER_H