For example, it's the number of player in team :
you have "players_in_team()== 20" and many other place where you use 20.
I think you should use :
#define MAX_PLAYERS 20 in enums.h
and players_in_team()==MAX_PLAYERS (and replace 20 by MAX_PLAYERS in all place).
If a day you need to increase max players, it's much easy..
More over, if you know all place, add a
#define COMPUTER_PLAYERS_COUNT 20
and use where you have to use it.
More over, maybe start to change player_in_team(void) to player_in_team(int teamID) :
so it can help for some algo who need to know how many, player there is in team, instead
of using a
Code: Select all
void someAlgoForOneTeam(gint team) {
...
players=(team==myteam)?player_team():COMPUTER_PLAYERS_COUNT
...
}