blob: df2be2abb2e5e9833177e9b64b4a2c2fa13238b8 [file] [log] [blame]
#include <stdlib.h>
#include <stdio.h>
#include "eightball.h"
extern "C" const char *Magic8Ball() {
const int NSIDES = 8;
const char* answer[NSIDES] = {
"YES",
"NO",
"MAYBE",
"MAYBE NOT",
"DEFINITELY",
"ASK ME TOMORROW",
"PARTLY CLOUDY",
"42",
};
return answer[rand() % NSIDES];
}