mirror of
https://git.zap.org.au/git/trader.git
synced 2025-02-02 15:08:13 -05:00
Allow a player to quit at the first prompt ("Enter number of players")
This commit is contained in:
parent
cdaeb2e869
commit
86b88e8929
@ -48,7 +48,9 @@
|
|||||||
|
|
||||||
On entry to this function, the "game_num" global variable determines
|
On entry to this function, the "game_num" global variable determines
|
||||||
whether an old game is loaded (if possible). On exit, all global
|
whether an old game is loaded (if possible). On exit, all global
|
||||||
variables in globals.h are initialised, apart from game_move[].
|
variables in globals.h are initialised, apart from game_move[]. If the
|
||||||
|
user aborts entering the necessary information, quit_selected is set to
|
||||||
|
true and number_players is 0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void init_game (void)
|
void init_game (void)
|
||||||
@ -99,6 +101,11 @@ void init_game (void)
|
|||||||
key = toupper(gettxchar(curwin));
|
key = toupper(gettxchar(curwin));
|
||||||
done = ((key >= '1') && (key <= (MAX_PLAYERS + '0'))) || (key == 'C');
|
done = ((key >= '1') && (key <= (MAX_PLAYERS + '0'))) || (key == 'C');
|
||||||
|
|
||||||
|
if ((key == KEY_ESC) || (key == KEY_CTRL('C')) || (key == KEY_CTRL('\\'))) {
|
||||||
|
quit_selected = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (! done) {
|
if (! done) {
|
||||||
beep();
|
beep();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user