Battle/Battle.cpp
bool Battle::BattleHappens(void) 
{
    float chanceToFight = 0.05;
    float determ = (double)rand() / RAND_MAX;

    if (chanceToFight > determ)
        return true;
    else
        return false;
}
// Determines if a battle will happen or not
Determines if a battle will happen or not
Determines if a battle will happen or not
bool Battle::BattleHappens(void) 
{
    float chanceToFight = 0.05;
    float determ = (double)rand() / RAND_MAX;
    if (chanceToFight > determ)
        return true;
    else
        return false;
}
bool Battle :: BattleHappens ( void ) { float chanceToFight = 0.05 ; float determ = ( double ) rand ( ) / RAND_MAX ; if ( chanceToFight > determ ) return true ; else return false ; }
Determines if a battle will happen or not
Determines if a battle will happen or not