author | cniehaus <cniehaus> | 2003-08-13 14:53:18 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-08-13 14:53:18 (UTC) |
commit | 1b22b22d6e50b46f3ea04b5a1cfc3dc9bfd8a78a (patch) (side-by-side diff) | |
tree | 327c797146d1a23cce2fdf558faa9ccacb9b6cf3 /noncore/games/oyatzee/oyatzee.h | |
parent | 6e7dbb9320256c326cd19e7555b4309e71d039e3 (diff) | |
download | opie-1b22b22d6e50b46f3ea04b5a1cfc3dc9bfd8a78a.zip opie-1b22b22d6e50b46f3ea04b5a1cfc3dc9bfd8a78a.tar.gz opie-1b22b22d6e50b46f3ea04b5a1cfc3dc9bfd8a78a.tar.bz2 |
well, a lot more is now implemented
Diffstat (limited to 'noncore/games/oyatzee/oyatzee.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/oyatzee/oyatzee.h | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/noncore/games/oyatzee/oyatzee.h b/noncore/games/oyatzee/oyatzee.h index 65a18fc..dd996ee 100644 --- a/noncore/games/oyatzee/oyatzee.h +++ b/noncore/games/oyatzee/oyatzee.h @@ -9,15 +9,19 @@ #include <qdatetime.h> // seed for rand() class Dice; class Game; class Scoreboard; class DiceWidget; +class Resultboard; +class Player; typedef QList<Dice> dicesList; +typedef QList<Resultboard> resultboardList; typedef QValueList<int> QValueListInt; +typedef QList<Player> playerList; class OYatzee : public QMainWindow { Q_OBJECT public: OYatzee( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~OYatzee(); @@ -51,12 +55,15 @@ class OYatzee : public QMainWindow { void slotRollDices(); private: int numOfPlayers; int numOfRounds; + /* + * Check what posibilities the player currently has + */ void detectPosibilities(); void displayPossibilites(); }; class Dice : public QFrame @@ -91,26 +98,75 @@ class DiceWidget : public QWidget QPushButton *rollButton; dicesList diceList; }; + +class Board : public QWidget +{ + Q_OBJECT + public: + Board( QWidget *parent = 0, const char* name = 0 ); + + protected: + virtual void paintEvent( QPaintEvent *e ); +}; + +class Possibilityboard : public Board +{ + Q_OBJECT + + public: + Possibilityboard( QWidget *parent = 0, const char* name = 0 ); + + protected: + virtual void paintEvent( QPaintEvent *e ); +}; + +class Resultboard : public Board +{ + Q_OBJECT + + public: + Resultboard( QString playerName , QWidget *parent = 0, const char* name = 0 ); + QString pName; + + protected: + virtual void paintEvent( QPaintEvent *e ); +}; + + class Scoreboard : public QWidget { Q_OBJECT public: - Scoreboard( QWidget *parent = 0, const char* name = 0 ); + Scoreboard( playerList ps, QWidget *parent = 0, const char* name = 0 ); + + Possibilityboard *pb; + resultboardList rbList; + playerList ps_; + void createResultboards(const int); + protected: void paintEvent( QPaintEvent *e ); }; + class Player { public: Player( QString name ); QString playerName; int totalPoints; }; +class Game +{ + public: + Game( playerList pla ); + playerList players; +}; + #endif // WORDGAME_H |