2024-08-27 21:58:35 +02:00
|
|
|
#ifndef RANK_H
|
|
|
|
#define RANK_H
|
|
|
|
|
|
|
|
#define M_STR 255
|
|
|
|
#define M_STR_LEN 255
|
|
|
|
|
|
|
|
struct Rank
|
|
|
|
{
|
|
|
|
char name[M_STR_LEN];
|
|
|
|
int score;
|
2024-08-27 23:07:20 +02:00
|
|
|
};
|
2024-08-27 21:58:35 +02:00
|
|
|
|
|
|
|
struct RankList
|
|
|
|
{
|
2024-08-27 23:07:20 +02:00
|
|
|
struct Rank rank[M_STR];
|
|
|
|
struct Rank rank_sorted[M_STR];
|
2024-08-27 21:58:35 +02:00
|
|
|
int rank_count;
|
2024-08-27 23:07:20 +02:00
|
|
|
};
|
2024-08-27 21:58:35 +02:00
|
|
|
|
2024-08-28 00:12:46 +02:00
|
|
|
struct Weighted
|
|
|
|
{
|
|
|
|
char opt1[M_STR_LEN];
|
|
|
|
float opt1_w;
|
|
|
|
char opt2[M_STR_LEN];
|
|
|
|
float opt2_w;
|
|
|
|
char opt3[M_STR_LEN];
|
|
|
|
float opt3_w;
|
|
|
|
};
|
|
|
|
|
|
|
|
void isort(char [][M_STR], struct Rank[], int);
|
|
|
|
void rank(struct RankList *);
|
|
|
|
void print_ranklist(struct RankList *);
|
2024-08-27 21:58:35 +02:00
|
|
|
|
|
|
|
#endif
|