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
|
#include <iostream>
#include "FlyMotion.h"
#include "Motion.h"
#include <time.h>
#include <stdlib.h>
using namespace std;
int main()
{
srand (time(NULL));
const char *fly[] = {"Goose","Plane","Pigeon","Time"};
const char *motn[] = {"Fly","Crawl","Swim","Run","Roll","Walk"};
const char *all[] = {"Goose","Plane","Pigeon","Time","Lizard","Turtle","Shark","Tiger","Stone","Ball","Boat","Nose","Snail","Engine"};
int num = rand() % 13 + 0;
const char *strall = all[num];
int numm = rand() % 5 + 0;
const char *strmotn = motn[numm];
FlyMotion *f = FlyMotion::getInstance();
f->method(fly);
return 0;
}
|