X-faced dice. More...
#include <Dice.hh>
Public Member Functions | |
| Dice (BaseRules *r) | |
| Dice contructor. | |
| ~Dice () | |
| Standart destructor. | |
| int | roll (const std::string &msg, enum eDiceFaceNumber type=D6, int nb_dice=1) |
| Roll dices of selected type, and print a debug to see which dice/result is used. | |
| int | roll (enum eRoll bb_roll_type, enum eDiceFaceNumber type=D6, int nb_dice=1) |
Static Public Member Functions | |
| static const char * | stringify (enum eBlockDiceFace face) |
| Get a stringified version of enum eBlockDiceFace. | |
| static const char * | stringify (enum eRoll roll) |
| Get a stringified version of enum eRoll. | |
X-faced dice.
| int Dice::roll | ( | const std::string & | msg, | |
| enum eDiceFaceNumber | type = D6, |
|||
| int | nb_dice = 1 | |||
| ) |
Roll dices of selected type, and print a debug to see which dice/result is used.
| msg | A debug message, printed. | |
| type | Type of dice(s) to roll. | |
| nb_dice | Number of dice to roll. |
Referenced by SBall::bounce(), SPlayer::checkArmour(), SPlayer::prepareKickoff(), SBall::scatter(), and SBall::throwIn().
1.6.3