aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-03-30 15:35:36 -0400
committerNathan Vance <nathav63@gmail.com>2015-03-30 15:35:36 -0400
commitac78ebaf7f7e9d96cb022ad8a14fc013a58ba262 (patch)
treefe3042b52fc061c88a9b9dc0b51883f7fa0781cb /main.c
parentDiscards are now tracked (diff)
download7w-ac78ebaf7f7e9d96cb022ad8a14fc013a58ba262.tar.gz
7w-ac78ebaf7f7e9d96cb022ad8a14fc013a58ba262.tar.bz2
7w-ac78ebaf7f7e9d96cb022ad8a14fc013a58ba262.zip
Started work on special wonder actions
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