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; }
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(); }
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