aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-05-04 23:22:21 -0400
committerNathan Vance <nathav63@gmail.com>2015-05-04 23:22:21 -0400
commit8960efac310399ebe434bbb3296013a987c86710 (patch)
treeae86dea43f09f979b5b65d38d7622c0e96440c8e /main.c
parentAdded basic view of game results (diff)
download7w-8960efac310399ebe434bbb3296013a987c86710.tar.gz
7w-8960efac310399ebe434bbb3296013a987c86710.tar.bz2
7w-8960efac310399ebe434bbb3296013a987c86710.zip
Added pregame setup
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index 174781e..0684561 100644
--- a/main.c
+++ b/main.c
@@ -17,6 +17,7 @@ void data_endturn();
int data_getera();
void data_setai(int p);
int data_isai(int p);
+int* pregame();
void halt()
{
@@ -34,8 +35,6 @@ void haltError(char *message, int num)
exit(1);
}
-static int ais[7] = {0, 1, 1, 1, 1, 1, 1};
-
main_routine()
{
int player = 0;
@@ -53,10 +52,11 @@ main()
{
io_init();
cards_init();
- data_init(4);
+ int *setupdat = pregame();
+ data_init(setupdat[7]);
int i;
for(i = 0; i < 7; i++) {
- if(ais[i]) data_setai(i);
+ if(setupdat[i]) data_setai(i);
}
main_routine();
halt();
bgstack15