aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index f743298..f37bba3 100644
--- a/main.c
+++ b/main.c
@@ -14,6 +14,8 @@ void view_refresh(int focus, int cursor, int player);
int data_numplayers();
void data_endturn();
int data_getera();
+void data_setai(int p);
+int data_isai(int p);
void halt()
{
@@ -27,7 +29,7 @@ main_routine()
{
int player = 0;
while(1) {
- if(ais[player]) ai_turn(player);
+ if(data_isai(player)) ai_turn(player);
else player_turn(player);
if(++player == data_numplayers()) {
data_endturn();
@@ -41,6 +43,10 @@ main()
io_init();
cards_init();
data_init(4);
+ int i;
+ for(i = 0; i < 7; i++) {
+ if(ais[i]) data_setai(i);
+ }
main_routine();
halt();
}
bgstack15