blob: ceff85c068da8fd5de460216496a341116bc80e6 (
plain)
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
|
#include "7w.h"
#include <stdlib.h>
void tester();
void io_init();
void cards_init();
void io_clearscreen();
int* getdeck(int era, int numplayers);
void data_init(int num_players);
void player_turn(int player);
void ai_turn(int player);
void wonder_selected(int player);
void view_refresh(int focus, int cursor, int player);
int data_numplayers();
void data_endturn();
void halt()
{
endwin();
exit(0);
}
static int ais[7] = {0, 0, 1, 0, 0, 0, 0};
main_routine()
{
int player = 0;
while(1) {
if(ais[player]) ai_turn(player);
else player_turn(player);
if(++player == data_numplayers()) {
data_endturn();
player = 0;
}
}
}
main()
{
io_init();
cards_init();
data_init(3);
main_routine();
halt();
}
|