1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
/*
team.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef TEAM_H
#define TEAM_H
#include "bygfoot.h"
#include "cup_struct.h"
#include "fixture_struct.h"
#include "team_struct.h"
/** Possibilities for team comparison. */
enum TeamCompare
{
TEAM_COMPARE_LEAGUE_RANK = 0,
TEAM_COMPARE_LEAGUE_LAYER,
TEAM_COMPARE_UNSORTED,
TEAM_COMPARE_AV_SKILL,
TEAM_COMPARE_OFFENSIVE,
TEAM_COMPARE_DEFENSE,
TEAM_COMPARE_END
};
Team
team_new(gboolean new_id);
gboolean
query_is_my_team(const Team *tm);
void
team_generate_players_stadium(Team *tm, gfloat av_talent);
gboolean
query_team_is_in_cups(const Team *tm, gint group);
gboolean
query_team_is_in_cup(const Team *tm, const Cup *cup);
GPtrArray*
team_get_pointers_from_array(const GArray *teams, GPtrArray *team_ptrs);
Team*
team_of_id(gint id);
Fixture*
team_get_fixture(const Team *tm, gboolean last_fixture);
gfloat
team_get_average_skill(const Team *tm, gboolean cskill);
gfloat
team_get_average_talent(const Team *tm);
gint
team_name_is_user(const gchar *team_name);
gint
team_is_user(const Team *tm);
gint
team_get_cup_rank(const Team *tm, const CupRound *cupround, gboolean abort);
gint
team_get_league_rank(const Team *tm, gint clid);
void
team_change_structure(Team *tm, gint new_structure);
gint
team_find_appropriate_structure(const Team *tm);
void
team_rearrange(Team *tm);
gchar*
team_attribute_to_char(gint attribute, gint value);
void
team_change_attribute_with_message(Team * tm, gint attribute, gint new_value);
void
team_update_team_weekly(Team *tm);
void
team_update_post_match(Team *tm, const Fixture *fix);
void
team_update_cpu_new_players(Team *tm);
void
team_update_team_week_roundly(Team *tm);
Team*
team_get_new(const Team *tm, gboolean fire);
GPtrArray*
team_get_sorted(GCompareDataFunc compare_function, gint type, gboolean cup);
gint
team_compare_func(gconstpointer a, gconstpointer b, gpointer data);
gint
team_get_index(const Team *tm);
gfloat
team_get_average_talents(const GArray *teams);
gboolean
query_team_plays(const Team *tm, gint week_number, gint week_round_number);
gint
team_get_table_value(const Team *tm, gint type);
void
team_write_results(const Team *tm, gchar *result_buf, gchar *goals_buf);
void
team_write_overall_results(const Team *tm, gint clid, gchar *results);
void
team_write_own_results(const Team *tm, gchar *buf, gboolean sort, gboolean cup_matches);
gboolean
query_team_is_in_teams_array(const Team *tm, const GPtrArray *teams);
gchar*
team_has_def_file(const Team *tm);
void
team_complete_def(Team *tm);
void
team_complete_def_sort(Team *tm);
gint
team_get_table_clid(const Team *tm);
#endif
|