From 15b43939deca0a44033fcec6f26accb32a3fc8eb Mon Sep 17 00:00:00 2001 From: Nathan Vance Date: Wed, 29 Apr 2015 08:21:50 -0400 Subject: Fixed ai trying to play cards not in its hand --- main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index f37bba3..2bf5781 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,6 @@ #include "7w.h" #include +#include void tester(); void io_init(); @@ -23,7 +24,17 @@ void halt() exit(0); } -static int ais[7] = {0, 1, 1, 1, 1, 1, 1}; +void haltError(char *message, int num) +{ + endwin(); + printf("Something has gone wrong, very wrong.\n"); + printf(message); + printf("\n"); + printf("Number associated with this error: %d\n", num); + exit(1); +} + +static int ais[7] = {1, 1, 1, 1, 1, 1, 1}; main_routine() { -- cgit