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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#include "rabbbit.h"
#include <iostream>
#include <ctime>
#include <string>
#include <cstdlib>
using namespace std;
rabbit::rabbit(int r,int p)
{
sex;
volvol = r%2;
if (volvol>0){
sex = true;
rabbitSex= "male";
}
else{
sex= false;
rabbitSex = "female";
}
c = r%21;
string rabbitName[21] = {"Steve", "Tom", "Rabi" , "Lorence", "Carrrot", "AssJucie","Nick","Israel","Noal","Hen","Keany","Lolo","Choclte","Nor","Lili","Kely","Nofar","Matilda","Igor","Joel","Nimrod",};
name = rabbitName[c];
int g = r%100;
if (g<2){
mutantRabbit = false;
}
if(p<6){
i = r%4;
string rabbitColor[4]= {"white", "brown", "black", "spotted"};
color = rabbitColor[i];
}
int rabbitAge[11];
for(int m =0;m<11;m++){
rabbitAge[m]=m;
}
if(p<6){ b = r%11;
age = rabbitAge[b];
}
}
void rabbit::ageing(){
age++;
}
rabbit::~rabbit()
{
}
|