Freeciv-3.3
|
#include <stdio.h>
#include <string.h>
#include "bitvector.h"
#include "log.h"
#include "mem.h"
#include "shared.h"
#include "culture.h"
#include "game.h"
#include "improvement.h"
#include "map.h"
#include "player.h"
#include "research.h"
#include "specialist.h"
#include "unit.h"
#include "unitlist.h"
#include "plrhand.h"
#include "score.h"
#include "srv_main.h"
Go to the source code of this file.
Data Structures | |
struct | claim_map |
Macros | |
#define | USER_AREA_MULT 1000 |
#define | LAND_AREA_DEBUG 0 |
Functions | |
static int | get_spaceship_score (const struct player *pplayer) |
static void | build_landarea_map (struct claim_map *pcmap) |
static void | get_player_landarea (struct claim_map *pcmap, struct player *pplayer, int *return_landarea, int *return_settledarea) |
void | calc_civ_score (struct player *pplayer) |
static int | get_units_score (const struct player *pplayer) |
int | get_civ_score (const struct player *pplayer) |
int | total_player_citizens (const struct player *pplayer) |
void | rank_users (bool interrupt) |
Count landarea, settled area, and claims map for all players.
Definition at line 161 of file score.c.
Referenced by calc_civ_score().
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().
|
static |
Returns the given player's land and settled areas from a claim map.
Definition at line 219 of file score.c.
Referenced by calc_civ_score().
Return the score given by the units stats.
Definition at line 343 of file score.c.
Referenced by get_civ_score().
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().