2004-12-23 13:58:39 +01:00
|
|
|
#ifndef PLAYER_H
|
|
|
|
#define PLAYER_H
|
|
|
|
|
|
|
|
#include "bygfoot.h"
|
2004-12-30 17:48:19 +01:00
|
|
|
#include "player_struct.h"
|
|
|
|
#include "team_struct.h"
|
2004-12-23 13:58:39 +01:00
|
|
|
|
2005-03-03 13:46:48 +01:00
|
|
|
enum PlayerCompareAttrib
|
|
|
|
{
|
|
|
|
PLAYER_COMPARE_ATTRIBUTE_GAME_SKILL = 0,
|
2005-03-09 14:10:28 +01:00
|
|
|
PLAYER_COMPARE_ATTRIBUTE_POS,
|
2005-03-03 13:46:48 +01:00
|
|
|
PLAYER_COMPARE_ATTRIBUTE_END
|
|
|
|
};
|
|
|
|
|
2005-03-10 21:59:39 +01:00
|
|
|
enum PlayerCardType
|
|
|
|
{
|
|
|
|
PLAYER_CARD_YELLOW = 0,
|
|
|
|
PLAYER_CARD_RED,
|
|
|
|
PLAYER_CARD_END
|
|
|
|
};
|
|
|
|
|
2004-12-30 17:48:19 +01:00
|
|
|
Player
|
2005-01-09 21:21:22 +01:00
|
|
|
player_new(Team *tm, gint average_skill);
|
2004-12-30 17:48:19 +01:00
|
|
|
|
|
|
|
gint
|
|
|
|
player_new_id(const GArray *players);
|
|
|
|
|
|
|
|
gint
|
|
|
|
player_get_position_from_structure(gint structure, gint player_number);
|
|
|
|
|
|
|
|
gint
|
|
|
|
player_new_talent(gint skill);
|
|
|
|
|
2005-03-03 13:46:48 +01:00
|
|
|
void
|
|
|
|
player_estimate_talent(Player *pl);
|
2004-12-30 17:48:19 +01:00
|
|
|
|
|
|
|
gint
|
|
|
|
player_assign_value(const Player *pl);
|
|
|
|
|
|
|
|
gint
|
|
|
|
player_assign_wage(const Player *pl);
|
|
|
|
|
|
|
|
void
|
|
|
|
player_copy(const Player *source, Player *dest);
|
|
|
|
|
|
|
|
void
|
|
|
|
player_append_to_array(const Player *pl, Team *tm);
|
2004-12-23 13:58:39 +01:00
|
|
|
|
2005-01-09 21:21:22 +01:00
|
|
|
void
|
|
|
|
player_remove_from_team(Team *tm, gint player_number);
|
|
|
|
|
|
|
|
gint
|
2005-03-08 09:25:46 +01:00
|
|
|
player_all_games_goals(const Player *pl, gint type);
|
2005-01-09 21:21:22 +01:00
|
|
|
|
|
|
|
gint
|
|
|
|
player_all_cards(const Player *pl);
|
|
|
|
|
|
|
|
Player*
|
|
|
|
player_of_ids(gint clid, gint team_id, gint id);
|
|
|
|
|
|
|
|
Player*
|
|
|
|
player_of(const Team *tm, gint number);
|
|
|
|
|
|
|
|
Player*
|
|
|
|
player_of_id(const Team *tm, gint id);
|
|
|
|
|
2005-03-03 13:46:48 +01:00
|
|
|
gint
|
|
|
|
player_compare_func(gconstpointer a, gconstpointer b, gpointer data);
|
|
|
|
|
2005-03-08 09:25:46 +01:00
|
|
|
gint
|
|
|
|
player_compare_substitute_func(gconstpointer a, gconstpointer b, gpointer data);
|
|
|
|
|
2005-03-03 13:46:48 +01:00
|
|
|
void
|
|
|
|
player_move(Team *tm1, gint player_number, Team *tm2, gint insert_at);
|
|
|
|
|
|
|
|
void
|
|
|
|
player_swap(Team *tm1, gint player_number1, Team *tm2, gint player_number2);
|
|
|
|
|
|
|
|
gint
|
2005-03-08 09:25:46 +01:00
|
|
|
player_get_cskill(const Player *pl, gint position);
|
2005-03-03 13:46:48 +01:00
|
|
|
|
|
|
|
gint
|
|
|
|
player_is_banned(const Player *pl);
|
|
|
|
|
2005-03-08 09:25:46 +01:00
|
|
|
gboolean
|
|
|
|
player_substitution_good_structure(gint old_structure, gint old_pos, gint player_pos);
|
|
|
|
|
|
|
|
gint
|
|
|
|
player_id_index(const Team *tm, gint player_id);
|
|
|
|
|
2005-03-09 14:10:28 +01:00
|
|
|
gfloat
|
|
|
|
player_get_game_skill(const Player *pl, gboolean skill);
|
|
|
|
|
2005-03-09 15:02:49 +01:00
|
|
|
void
|
|
|
|
player_decrease_fitness(Player *pl);
|
|
|
|
|
2005-03-10 21:59:39 +01:00
|
|
|
gint
|
|
|
|
player_card_get(const Player *pl, gint clid, gint card_type);
|
|
|
|
|
|
|
|
void
|
|
|
|
player_card_set(Player *pl, gint clid, gint card_type, gint value, gboolean diff);
|
|
|
|
|
2004-12-23 13:58:39 +01:00
|
|
|
#endif
|