Ejemplo n.º 1
0
Zombie	*ZombieEvent::newZombie(STRING name) {
	Zombie *tempZombie = new Zombie();
	tempZombie->setName(name);
	tempZombie->setType(this->_type);
	tempZombie->announce();
	return tempZombie;
}
Ejemplo n.º 2
0
Zombie	*ZombieEvent::randomChamp(void) {
	static char const namePool[20][20] = {
		"Brain",
		"Imotep",
		"charlotte",
		"Charlot",
		"Robert",
		"Elisa",
		"Berangere",
		"Sangoku",
		"Bulma",
		"Patrick",
		"Patricia",
		"Elise",
		"Jesus",
		"Marie",
		"Jeniffer",
		"Carolle",
		"William",
		"Rambo",
		"Anakin",
		"Popey"
	};
	int i = rand();
	if (i < 0) i *= 1;
	Zombie *tempZombie = new Zombie();
	tempZombie->setName(namePool[i % 20]);
	tempZombie->setType(this->_type);
	tempZombie->announce();
	return tempZombie;
}