Freeciv-3.3
|
#include "fc_types.h"
Go to the source code of this file.
Functions | |
void | calc_civ_score (struct player *pplayer) |
int | get_civ_score (const struct player *pplayer) |
int | total_player_citizens (const struct player *pplayer) |
void | rank_users (bool) |
Calculates the civilization score for the player.
Definition at line 251 of file score.c.
Referenced by begin_turn(), sg_load_sanitycheck(), and srv_scores().
Return the civilization score (a numerical value) for the player.
Definition at line 352 of file score.c.
Referenced by api_server_player_civilization_score(), calc_civ_score(), and rank_users().
At the end of a game, figure the winners and losers of the game and output to a suitable place.
The definition of winners and losers: a winner is one who is alive at the end of the game and has not surrendered, or in the case of a team game, is alive or a teammate is alive and has not surrendered. A loser is surrendered or dead. Exception: the winner of the spacerace and their teammates will win of course.
In games ended by /endgame, endturn, or any other interruption not caused by satisfaction of victory conditions, for each team is calculated the sum of the scores of any belonging member which is alive and has not surrendered; all the players in the team with the higest sum of scores win. This condition is signaled to the function by the boolean "interrupt".
Barbarians do not count as winners or losers.
If interrupt is true, rank players by team score rather than by alive/dead status.
Definition at line 417 of file score.c.
Referenced by srv_running().
Return the total number of citizens in the player's nation.
Definition at line 382 of file score.c.
Referenced by dai_gold_reserve(), end_turn(), get_civ_score(), get_pop(), and historian_generic().