1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#include "Colour.h"
#include <ctime>
#include <cstdlib>
Colour::Colour(void)
{
colour_list[12][3] = { {201,47,39},
{156,0,37},
{216,24,73},
{200,33,102},
{251,81,55},
{250,141,24},
{255,240,115},
{239,233,197},
{140,216,233},
{22,175,235},
{8,81,140},
{31,8,140},
};
}
Colour::~Colour(void){}
int Colour::*getColour(void)
{
int column = int(13*rand()/(RAND_MAX + 1.0));
for(int index=0; index<3; index++)
colour[index] = colour_list[column][index];
}
|