]> git.cworth.org Git - rrsolve/blobdiff - src/rrsolve.c
Permit rr_client_next_notice to return null notice
[rrsolve] / src / rrsolve.c
index af6d086e36fe2fd23020762c733a1bba687472e8..89325b7b2f9afb8afd50ed42db39a53912d9a10e 100644 (file)
@@ -90,7 +90,7 @@ char TOUGH[] = "\n"
 " ===                         ===             ===         ===     \n"
 "|... ... ... ... ... ... ... ... ... ... ... .yc|... ... ... ...|\n"
 "     ===                     === ===                             \n"
-"|...|.YS ... ... ... ... ...|... ...|... ... ... ... ... ... ...|\N"
+"|...|.YS ... ... ... ... ...|... ...|... ... ... ... ... ... ...|\n"
 "                                                 ===             \n"
 "|... ... ... ... ... ... ...|... ...|... ... ...|.ww ... ... ...|\n"
 "     ===             ===     === ===                             \n"
@@ -107,7 +107,7 @@ char TOUGH[] = "\n"
 "|... ...|.gt ... ... ... ... ... ... ... ... ... ...|.ro ... ...|\n"
 "         ===                                                     \n"
 "|... ... ... ... ... ...|... ... ... ... ...|... ... ... ... ...|\n"
-" === === === === === === === === === === === === === === === === "
+" === === === === === === === === === === === === === === === === ";
 /*
 Move #1 generated 11 new states.
 Move #2 generated 59 new states.
@@ -184,8 +184,10 @@ handle_events (rr_client_t *client)
                     rr_status_str (status));
            return;
        }
-
-       printf ("Received notice of type %d\n", notice->type);
+       if (!notice) {
+           fprintf (stderr, "No notice during rr_client_next_notice\n");
+           continue;
+       }
 
        switch  (notice->type) {
        case RR_NOTICE_GAMEOVER:
@@ -224,7 +226,6 @@ handle_events (rr_client_t *client)
                nanosleep (&move_delay, NULL);
            }
            rrs_solution_fini (&solution);
-           return;
            break;
        case RR_NOTICE_ABANDON:
            rr_client_abandon (client);