Ejemplo n.º 1
0
/****************************************************************
 ...
*****************************************************************/
static void select_random_race(void)
{
  /* try to find a free nation */
  /* FIXME: this code should be done another way. -ev */
  while (1) {
    unsigned int race_toggle_index = fc_rand(nation_count());

    if (!is_nation_playable(nation_by_number(race_toggle_index))
	|| !nation_by_number(race_toggle_index)->is_available
	|| nation_by_number(race_toggle_index)->player) {
      continue;
    }
    if (XtIsSensitive(races_toggles[race_toggle_index])) {
      x_simulate_button_click(races_toggles[race_toggle_index]);
      break;
    }
  }
}
Ejemplo n.º 2
0
char* get_name_of_nation_id(int id) {
    return (char*)nation_plural_translation(nation_by_number(id));
}
Ejemplo n.º 3
0
int city_style_of_nation_id(int id) {
    return city_style_of_nation(nation_by_number(id));
}