forked from jacksonbarreto/trivial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrivial.c
54 lines (46 loc) · 794 Bytes
/
trivial.c
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
#define __MAIN__
#include "inc/config.h"
int main(void)
{
CONTROLINT choice;
boot();
renderInicio();
/*
QUESTION question;
FILE * file = openFile("db/themeQuestions1.dat",BINARY_READING);
fseek(file,sizeof(FILEINF),SEEK_SET);
do
{
readData(&question,sizeof(QUESTION),1,file);
cardFrame(question.title,question.answers);
system("pause");
}
while(!feof(file));
*/
do
{
choice = rendersMainMenu();
switch(choice)
{
case PLAY:
startGame();
break;
case NEW_USER:
registerNewUser();
break;
case TOP_10:
listBestPlayers();
break;
case LATEST_PLAYERS:
lastPlayers();
break;
case MY_ACCOUNT:
insertQuestion();
break;
}
}
while(choice != EXIT);
turnOff();
renderCreditos();
return EXIT_SUCCESS;
}