1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-02-24 07:19:21 +01:00
bygfoot/src/player.h

140 lines
2.6 KiB
C
Raw Normal View History

2004-12-23 12:58:39 +00:00
#ifndef PLAYER_H
#define PLAYER_H
#include "bygfoot.h"
#include "player_struct.h"
#include "team_struct.h"
2004-12-23 12:58:39 +00:00
enum PlayerCompareAttrib
{
PLAYER_COMPARE_ATTRIBUTE_GAME_SKILL = 0,
2005-03-09 13:10:28 +00:00
PLAYER_COMPARE_ATTRIBUTE_POS,
PLAYER_COMPARE_ATTRIBUTE_END
};
2005-03-13 15:46:15 +00:00
enum PlayerValue
2005-03-10 20:59:39 +00:00
{
2005-03-13 15:46:15 +00:00
PLAYER_VALUE_CARD_YELLOW = 0,
PLAYER_VALUE_CARD_RED,
PLAYER_VALUE_GAMES,
PLAYER_VALUE_GOALS,
PLAYER_VALUE_SHOTS,
PLAYER_VALUE_END
2005-03-10 20:59:39 +00:00
};
Player
2005-04-14 19:07:25 +00:00
player_new(Team *tm, gfloat average_skill, gboolean new_id);
gint
player_new_id(const GArray *players);
gint
player_get_position_from_structure(gint structure, gint player_number);
2005-03-13 15:46:15 +00:00
gfloat
player_new_talent(gfloat skill);
void
player_estimate_talent(Player *pl);
gint
player_assign_value(const Player *pl);
gint
player_assign_wage(const Player *pl);
2005-01-09 20:21:22 +00:00
gint
2005-03-08 08:25:46 +00:00
player_all_games_goals(const Player *pl, gint type);
2005-01-09 20:21:22 +00:00
gint
player_all_cards(const Player *pl);
Player*
2005-04-13 13:01:59 +00:00
player_of_idx_team(const Team *tm, gint number);
2005-01-09 20:21:22 +00:00
Player*
2005-04-13 13:01:59 +00:00
player_of_id_team(const Team *tm, gint id);
2005-01-09 20:21:22 +00:00
gint
player_compare_func(gconstpointer a, gconstpointer b, gpointer data);
2005-03-08 08:25:46 +00:00
gint
player_compare_substitute_func(gconstpointer a, gconstpointer b, gpointer data);
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);
2005-03-13 15:46:15 +00:00
gfloat
2005-03-08 08:25:46 +00:00
player_get_cskill(const Player *pl, gint position);
gint
player_is_banned(const Player *pl);
2005-03-08 08:25:46 +00: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 13:10:28 +00:00
gfloat
player_get_game_skill(const Player *pl, gboolean skill);
2005-03-09 14:02:49 +00:00
void
player_decrease_fitness(Player *pl);
2005-03-10 20:59:39 +00: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);
2005-03-13 15:46:15 +00:00
void
player_games_goals_set(Player *pl, gint clid, gint type, gint value, gboolean diff);
gint
player_games_goals_get(const Player *pl, gint clid, gint type);
void
player_update_weekly(Team *tm, gint idx);
void
player_remove_contract(Team *tm, gint idx);
void
player_update_skill(Player *pl);
void
player_update_fitness(Player *pl);
void
2005-03-14 09:29:39 +00:00
player_update_post_match(Player *pl, gint clid);
2005-03-13 15:46:15 +00:00
2005-03-13 21:10:19 +00:00
void
2005-03-19 20:04:08 +00:00
player_replace_by_new(Player *pl, gboolean free_player);
2005-03-13 21:10:19 +00:00
void
player_remove_from_team(Team *tm, gint idx);
2005-03-14 09:29:39 +00:00
void
player_update_week_roundly(Team *tm, gint idx);
2005-03-14 17:47:27 +00:00
void
player_update_injury(Player *pl);
2005-03-20 20:49:55 +00:00
void
player_copy(Player *pl, Team *tm, gint insert_at);
2005-04-07 16:44:33 +00:00
gchar*
player_injury_to_char(gint injury_type);
2005-04-13 13:01:59 +00:00
Team*
player_id_team(gint player_id);
void
player_season_start(Player *pl);
2005-04-07 16:44:33 +00:00
2004-12-23 12:58:39 +00:00
#endif