2010-04-13 04:07:00 +00:00
|
|
|
#include <stdlib.h>
|
2010-04-13 02:42:21 +00:00
|
|
|
#include "../lib/util.h"
|
|
|
|
#include "../lib/game.h"
|
2010-04-13 04:07:00 +00:00
|
|
|
#include "../lib/keyboard.h"
|
2010-03-31 05:21:17 +00:00
|
|
|
|
|
|
|
int main(int argc, const char *argv[]) {
|
2010-04-13 04:07:00 +00:00
|
|
|
int option;
|
|
|
|
|
2010-04-12 05:56:28 +00:00
|
|
|
initialize_curses();
|
2010-03-31 05:21:17 +00:00
|
|
|
|
2010-04-13 04:07:00 +00:00
|
|
|
greet_player();
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
switch (option = getch()) {
|
|
|
|
case KEY_SPACEBAR:
|
|
|
|
initialize_game();
|
|
|
|
break;
|
|
|
|
case 'q':
|
|
|
|
case 'Q':
|
|
|
|
end_curses();
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
key_event();
|
|
|
|
}
|
2010-04-03 03:32:19 +00:00
|
|
|
|
2010-04-12 05:56:28 +00:00
|
|
|
return(0);
|
2010-03-31 05:21:17 +00:00
|
|
|
}
|