1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <T/stdlib.h> #include "Dice.h" Dice::Dice() { T::srand( T::time( 0 ) ); } unsigned Dice::roll() { return (T::rand() % 6) + 1; }