diff options
| -rw-r--r-- | chatbot.c | 17 | ||||
| -rw-r--r-- | joshua.c | 4 | ||||
| -rw-r--r-- | strings.h | 5 |
3 files changed, 20 insertions, 6 deletions
@@ -27,6 +27,7 @@ void do_chatbot(void) { char buf[513]; int ret=getnstr(buf, 512); + usleep(SLEEP_TIME*100); if(ret==ERR) { print_string("\n\n"); @@ -37,7 +38,7 @@ void do_chatbot(void) { allLower(buf); remove_punct(buf); - usleep(SLEEP_TIME*25); + bool valid=false; switch(stage) { case 0: @@ -47,6 +48,7 @@ void do_chatbot(void) { print_string("\n\nEXCELLENT. IT'S BEEN A LONG TIME. CAN YOU EXPLAIN\nTHE REMOVAL OF YOUR USER ACCOUNT ON 6/23/73?\n\n"); ++stage; + valid=true; } } case 1: @@ -56,6 +58,7 @@ void do_chatbot(void) { print_string("\n\nYES THEY DO. SHALL WE PLAY A GAME?\n\n"); ++stage; + valid=true; } } case 2: @@ -65,6 +68,7 @@ void do_chatbot(void) { print_string("\n\nWOULDN'T YOU PREFER A GOOD GAME OF CHESS?\n\n"); ++stage; + valid=true; } } case 3: @@ -73,11 +77,18 @@ void do_chatbot(void) if(strcmp(buf, stage4_triggers[i])==0) { print_string("\n\nFINE.\n\n"); + valid=true; usleep(SLEEP_TIME*100); global_thermonuclear_war(); } } + } // switch + if(!valid) + { + print_string("\n\n"); + print_string("Sorry?"); + print_string("\n\n"); } - } - } + } // else + } // while } @@ -29,7 +29,7 @@ void be_joshua() refresh(); int ret=getnstr(buf, 32); allLower(buf); - usleep(SLEEP_TIME*25); + usleep(SLEEP_TIME*100); if(strcmp(buf, "help logon")==0) { print_string("\nHELP NOT AVAILABLE\n\n\n"); @@ -49,7 +49,7 @@ void be_joshua() } } while(strcmp(buf, "joshua")); random_stuff(); - usleep(SLEEP_TIME*25); + usleep(SLEEP_TIME*100); print_string("GREETINGS, PROFESSOR FALKEN.\n\n"); refresh(); getnstr(buf, 32); /* ignore this */ @@ -8,7 +8,8 @@ const char* stage2_triggers[] = { "sometimes people make mistakes", "mistakes are make by people sometimes", "people make mistakes sometimes", - "people make mistakes" + "people make mistakes", + "people sometimes make mistak" /* this is no typo. in the movie, at one scene, it appears like this */ }; const char* stage3_triggers[] = { "love to how about global thermonuclear war", @@ -19,6 +20,8 @@ const char* stage3_triggers[] = { const char* stage4_triggers[] = { "no lets play global thermonuclear war", "no lets play global thermonuclear war instead", + "later lets play global thermonuclear war", + "later lets play global thermonuclear war instead", "lets play global thermonuclear war", "global thermonuclear war is better" }; |