summaryrefslogtreecommitdiff
path: root/noncore/games/oyatzee/oyatzee.h
Side-by-side diff
Diffstat (limited to 'noncore/games/oyatzee/oyatzee.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/oyatzee/oyatzee.h58
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