From 7741c4a02bf90cc09debbc730bc36f160a1c7b31 Mon Sep 17 00:00:00 2001 From: Thomas Thurman Date: Fri, 21 Aug 2009 21:39:21 -0400 Subject: [PATCH] show error if number of NKIs drops below critical level, don't go into infinite loop --- rfk.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rfk.c b/rfk.c index 7a62ea8..71079d5 100644 --- a/rfk.c +++ b/rfk.c @@ -456,6 +456,13 @@ main (gint argc, place_in_arena_randomly (robot); place_in_arena_randomly (kitten); + if (nki_count < amount_of_random_stuff) + { + gtk_widget_show_all (window); + show_message ("There are too few non-kitten items to play a meaningful game."); + exit (EXIT_FAILURE); + } + for (x=0; x < amount_of_random_stuff; x++) place_in_arena_randomly (random_character (description ())); -- 1.7.9.5