Corewar documentation 1.0.0
Loading...
Searching...
No Matches
champion.c File Reference

The file containing the champion functions. More...

Functions

int get_next_champion_number (void)
 Get the next champion number disponible.
 
int champion_number_exist (int number)
 Check if a champion number exist.
 
int analyse_champions (void)
 Analyse each champion files and complete the champion structure.
 
champion_tget_champion_by_number (int number)
 Get a champion by its number.
 

Detailed Description

The file containing the champion functions.

Function Documentation

◆ analyse_champions()

int analyse_champions ( void )

Analyse each champion files and complete the champion structure.

Returns
int 0 if the analyse is a success, 84 otherwise

◆ champion_number_exist()

int champion_number_exist ( int number)

Check if a champion number exist.

Parameters
numberThe champion number
Returns
int 1 if the champion number exist, 0 otherwise

◆ get_champion_by_number()

champion_t * get_champion_by_number ( int number)

Get a champion by its number.

Parameters
numberThe champion number
Returns
champion_t* The champion

◆ get_next_champion_number()

int get_next_champion_number ( void )

Get the next champion number disponible.

Returns
int The next champion number