X-Git-Url: https://git.ralfj.de/multypo.git/blobdiff_plain/e8b07da1c5251e412f80fdeb94fb327b641fc956..318e322c3cd72e6a7f692c6f7c7770c0e15720c8:/qt/player.h?ds=sidebyside diff --git a/qt/player.h b/qt/player.h index 4674255..3817866 100644 --- a/qt/player.h +++ b/qt/player.h @@ -6,17 +6,32 @@ class Player { -private: - QString name; - QString currentLine; - QLabel* theLabel; public: + enum State { + Naming, + Waiting, + Typing + }; + Player(QWidget* parent); + void handleKey(QString); - void resetText(); - bool hasName(); - QString getName(); - QString getCurrentLine(); + 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