/[projet1]/public/oric/games/Awele/MiniGameAwale_Main.c
Defence Force logotype

Contents of /public/oric/games/Awele/MiniGameAwale_Main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 491 - (show annotations)
Sun May 22 11:33:41 2011 UTC (8 years, 10 months ago) by dbug
File MIME type: text/plain
File size: 775 byte(s)
Added an Oric version of the game Awele made by a coworker eons ago :)
1 #include "lib.h"
2 #include "MiniGameAwale.h"
3 //#include <stdio.h>
4
5 #define NB_TEST (5000)
6
7
8
9 /*
10 void srand(unsigned int seed)
11 {
12 holdrand = seed;
13 }
14 */
15
16
17 int res[] = { 0, 0, 0};
18
19
20 int main()
21 {
22 GameAwale game;
23 int i;
24
25 // for cpu, we can need random
26 //srand(time(0));
27 //srand(0);
28
29 printf("Awele\n");
30 for(i=0; i<NB_TEST; ++i)
31 {
32 printf("Game init\n");
33 GameAwale_GameInit(&game);
34 printf("Game loop\n");
35 GameAwale_GameLoop(&game);
36 printf("Game term\n");
37 res[GameAwale_GameTerm(&game)]++;
38 }
39
40 //cout << "Draw: " << res[0] << endl;
41 //cout << "P1: " << res[1] << endl;
42 //cout << "P2: " << res[2] << endl;
43 printf("Draw: %d\n", res[0]);
44 printf("P1: %d\n", res[1]);
45 printf("P2: %d\n", res[2]);
46
47 return 0;
48 }

  ViewVC Help
Powered by ViewVC 1.1.26