예제 #1
0
int initBoard()
{
	int i,j;
	for(i=0; i<HEIGHT; i++)
		for(j=0; j<WIDTH; j++)
			board[i][j]=0;	
	randGenerate();
	randGenerate();
	backTo = boardOneBefore; 
	storeNow();
	return 0;
}
예제 #2
0
int main()
{

	initscr();
	start_color();
	noecho();
	initGame();
//	system("clear");
	char ch;
	ch=getch();
	int ret; 
	while(ch!='\x1b')
	{
		moveDir(ch);
		if(moveFlag)
		{
			randGenerate();
			updateView();
			moveFlag=0;
		}
		if(CONTINUE !=	winOrLose())
		{
			break;
		}	
		ch=getch();
	}
	
	endwin();
}
예제 #3
0
파일: Spawner.cpp 프로젝트: rzsavilla/Monk
void Spawner::spawn() {
	createPoints();
	bSpawning = true;
	randGenerate();
	for (int i = 0; i < iSpawnCount; i++) {
		entitiesSpawned.push_back(spawnEntity);
		entitiesSpawned.back().setPosition(Points[randomPosition[i]]);
		entitiesSpawned.back().setTargetPos(sf::Vector2f(640, 360));
	}
	std::cout << entitiesSpawned.size() << std::endl;
}									//Start Spawning