nsnake
Classic snake game for the terminal
Functions
Utils::Random Namespace Reference

Better random number generator. More...

Functions

void seed ()
 Must be called before any of those.
 
int between (int min, int max)
 Random number between min and max.
 
bool boolean ()
 Random boolean.
 
bool booleanWithChance (float percent)
 Random boolean with chance of #percent. More...
 

Detailed Description

Better random number generator.

Function Documentation

bool Utils::Random::booleanWithChance ( float  percent)

Random boolean with chance of #percent.

Note
Precision up to 2 decimal digits.

Definition at line 64 of file Utils.cpp.