#include "RandomGenerator.h"

RandomGenerator::RandomGenerator()
{
    // reset random seed - to generate different values each time.
    std::srand(time(0));
}

RandomGenerator::~RandomGenerator()
{
    std::cout << "Random deleted" << std::endl;
}

int RandomGenerator::getRandomNumber(int min, int max, bool includeMax)
{
    if (min == max)
    {
        return min;
    }

    return std::rand() % ((max - min) + includeMax) + min;
}

#include "RandomGenerator.h"

RandomGenerator::RandomGenerator()
{
    // reset random seed - to generate different values each time.
    std::srand(time(0));
}

RandomGenerator::~RandomGenerator()
{
    std::cout << "Random deleted" << std::endl;
}

int RandomGenerator::getRandomNumber(int min, int max, bool includeMax)
{
    return std::rand() % ((max - min) + includeMax) + min;
}

--- 
+++ 
@@ -13,5 +13,10 @@
 
 int RandomGenerator::getRandomNumber(int min, int max, bool includeMax)
 {
+    if (min == max)
+    {
+        return min;
+    }
+
     return std::rand() % ((max - min) + includeMax) + min;
 }
Fix bug with generating numbers.
