--- a/src/main.c Thu Apr 17 11:55:36 2014 +0200 +++ b/src/main.c Thu Apr 17 12:16:14 2014 +0200 @@ -179,15 +179,22 @@ } atexit(leavescr); + int exitcode; if (settings.singlemachine) { game_start_singlemachine(&settings); + exitcode = EXIT_SUCCESS; } else { - int exitcode = is_server(&settings) ? + exitcode = is_server(&settings) ? server_run(&settings) : client_run(&settings); - - if (exitcode != EXIT_SUCCESS) { - cbreak(); getch(); - } } + + mvaddstr(getmaxy(stdscr)-1, 0, + "Game has ended. Press any key to leave..."); + refresh(); + cbreak(); + flushinp(); + getch(); + + return exitcode; }