Example #1
0
void Engine::startPhase() {
    cout << "Assignment: starting game..." << endl;
    generateAIPlayers();
    chooseMap();
    assignCountries();
    gamePlayPhase();
}
Example #2
0
void	hardcore()
{
  char	*tab;
  char	*map;
  char	*newMap;
  int n;
  int *ptrN;

  my_putstr("Vous avez choisi le mode HARDCORE !!!\n");
  n = 1;
  ptrN = &n;
  if ((tab = malloc(sizeof(char)*1000)) == NULL)
    my_putstr("unable to allocate memory \n");
  map = readMap(chooseMap(), tab, ptrN);
  my_putstr("\033c");
  my_putstr(map);
  newMap = hardDeplacement(map);
  sleep(1);
  my_putstr("\033c");
  map = newMap;
  if (my_strcmp("11", map) == 0)
    gagnerhardcore();
  else
    perduhardcore();
  free(tab);
}