-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibFile.h
37 lines (27 loc) · 864 Bytes
/
libFile.h
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
//
// Libreria contenente le funzioni e le procedure usate per la gestione dei file all'interno del gioco
//
#ifndef RISIKA_LIBFILE_H
#define RISIKA_LIBFILE_H
#include "stdio.h"
#include "libPrep.h"
#include "libRisika.h"
typedef struct {
char colore[10];
int nP;
} Stat;
typedef struct {
int nGioc;
int currentP;
Giocatore g[MAX_G];
Tabellone t[N_TERRITORI];
int nCarte;
int carte[N_CARTE];
} Salvataggio;
void scriviStatistiche(FILE *f, Stat s[]);
void statisticheVittoria(Giocatore *g, Stat s[]);
void leggiStatistiche(FILE *f, Stat s[]);
Salvataggio importaSalvataggio(FILE *f, Mazzo *m, Tabellone t[], int *nGioc, int *currentP, int *nCarte, FILE *log);
Colore assegnaColore(int id);
void creaSalvataggio(FILE *f, int nGiocatori, int currentP, Giocatore *g, int nC, Mazzo m, Tabellone t[]);
#endif //RISIKA_LIBFILE_H