Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OYatzee Class Reference

#include </home/clem/local/src/opie/noncore/games/oyatzee/oyatzee.h>

Collaboration diagram for OYatzee:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  Ones = 1, Twos = 2, Threes = 3, Fours = 4,
  Fives = 5, Sixes = 6, ThreeOfAKind = 9, FourOfAKind = 10,
  FullHouse = 11, SStraight = 12, LStraight = 13, Yatzee = 14,
  Chance = 15
}

Public Slots

void slotStartGame ()
void slotRollDices ()
void slotEndRound (int)

Public Member Functions

 OYatzee (QWidget *parent=0, const char *name=0, WFlags fl=0)
 ~OYatzee ()
Gameg ()
void setPlayerNumber (const int num)
void setRoundsNumber (const int num)

Static Public Member Functions

static QString appName ()

Public Attributes

DiceWidgetdw
Scoreboardsb
QValueListInt posibilities
playerList ps

Private Member Functions

void nextPlayer ()
void detectPosibilities ()
void displayPossibilites ()
int getPoints (const int, QValueListInt)
void startGame ()
void stopGame ()

Private Attributes

int numOfPlayers
int numOfRounds
int currentPlayer
int oakPoints
bool lastPlayerFinished

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
Ones 
Twos 
Threes 
Fours 
Fives 
Sixes 
ThreeOfAKind 
FourOfAKind 
FullHouse 
SStraight 
LStraight 
Yatzee 
Chance 

Definition at line 45 of file oyatzee.h.


Constructor & Destructor Documentation

OYatzee::OYatzee QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

Definition at line 16 of file oyatzee.cpp.

References currentPlayer, dw, lastPlayerFinished, Scoreboard::pb, Player, ps, DiceWidget::rollButton, sb, setPlayerNumber(), setRoundsNumber(), slotEndRound(), slotRollDices(), and tr.

OYatzee::~OYatzee  ) 
 

Definition at line 158 of file oyatzee.cpp.


Member Function Documentation

static QString OYatzee::appName  )  [inline, static]
 

Definition at line 33 of file oyatzee.h.

References QString::fromLatin1().

void OYatzee::detectPosibilities  )  [private]
 

Definition at line 162 of file oyatzee.cpp.

References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::clear(), d, DiceWidget::diceList, dw, QValueList< T >::end(), QValueList< T >::find(), Dice::hasValue(), i, odebug, oendl, and posibilities.

Referenced by slotRollDices().

void OYatzee::displayPossibilites  )  [private]
 

Definition at line 266 of file oyatzee.cpp.

References Scoreboard::pb, posibilities, sb, and Possibilityboard::setIntlist().

Game* OYatzee::g  ) 
 

int OYatzee::getPoints const   int,
QValueListInt 
[private]
 

Definition at line 133 of file oyatzee.cpp.

References QValueList< T >::begin(), Chance, and QValueList< T >::end().

Referenced by slotEndRound().

void OYatzee::nextPlayer  )  [private]
 

Definition at line 121 of file oyatzee.cpp.

References currentPlayer, numOfPlayers, and ps.

Referenced by slotEndRound().

void OYatzee::setPlayerNumber const int  num  ) 
 

Definition at line 328 of file oyatzee.cpp.

References numOfPlayers.

Referenced by OYatzee().

void OYatzee::setRoundsNumber const int  num  ) 
 

Definition at line 333 of file oyatzee.cpp.

References numOfRounds.

Referenced by OYatzee().

void OYatzee::slotEndRound int   )  [slot]
 

Definition at line 48 of file oyatzee.cpp.

References QValueList< T >::append(), Chance, currentPlayer, d, DiceWidget::diceList, dw, QValueList< T >::end(), QValueList< T >::find(), Fives, FourOfAKind, Fours, FullHouse, getPoints(), Dice::hasValue(), LStraight, nextPlayer(), Scoreboard::nextRB(), oakPoints, odebug, oendl, Ones, posibilities, sb, Sixes, SStraight, ThreeOfAKind, Threes, Twos, and Yatzee.

Referenced by OYatzee().

void OYatzee::slotRollDices  )  [slot]
 

Definition at line 342 of file oyatzee.cpp.

References currentPlayer, d, detectPosibilities(), DiceWidget::diceList, dw, Dice::isSelected, odebug, oendl, ps, Dice::roll(), and tr.

Referenced by OYatzee().

void OYatzee::slotStartGame  )  [slot]
 

Definition at line 338 of file oyatzee.cpp.

void OYatzee::startGame  )  [private]
 

Definition at line 319 of file oyatzee.cpp.

void OYatzee::stopGame  )  [private]
 

Definition at line 326 of file oyatzee.cpp.


Member Data Documentation

int OYatzee::currentPlayer [private]
 

Definition at line 67 of file oyatzee.h.

Referenced by nextPlayer(), OYatzee(), slotEndRound(), and slotRollDices().

DiceWidget* OYatzee::dw
 

Definition at line 36 of file oyatzee.h.

Referenced by detectPosibilities(), OYatzee(), slotEndRound(), and slotRollDices().

bool OYatzee::lastPlayerFinished [private]
 

Definition at line 73 of file oyatzee.h.

Referenced by OYatzee().

int OYatzee::numOfPlayers [private]
 

Definition at line 65 of file oyatzee.h.

Referenced by nextPlayer(), and setPlayerNumber().

int OYatzee::numOfRounds [private]
 

Definition at line 66 of file oyatzee.h.

Referenced by setRoundsNumber().

int OYatzee::oakPoints [private]
 

Definition at line 69 of file oyatzee.h.

Referenced by slotEndRound().

QValueListInt OYatzee::posibilities
 

Definition at line 39 of file oyatzee.h.

Referenced by detectPosibilities(), displayPossibilites(), and slotEndRound().

playerList OYatzee::ps
 

Definition at line 40 of file oyatzee.h.

Referenced by nextPlayer(), OYatzee(), and slotRollDices().

Scoreboard* OYatzee::sb
 

Definition at line 37 of file oyatzee.h.

Referenced by displayPossibilites(), OYatzee(), and slotEndRound().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:43:59 2005 for OPIE by  doxygen 1.4.2