aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-09-15 22:11:38 +0000
committerrodri <rgl@antares-labs.eu>2023-09-15 22:11:38 +0000
commit651db54ad2917ea0e055b74047201ef0b6022e63 (patch)
treeb752ac5c87d06c0920d2b5726a4d78ce1dd3656c
parentb6bc5d9b2c4fdb5b49042a98541e6f9758debe66 (diff)
downloadbattleship-651db54ad2917ea0e055b74047201ef0b6022e63.tar.gz
battleship-651db54ad2917ea0e055b74047201ef0b6022e63.tar.bz2
battleship-651db54ad2917ea0e055b74047201ef0b6022e63.zip
really allow any key to be pressed to continue.
-rw-r--r--bts.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bts.c b/bts.c
index 0b9911e..6d7a22e 100644
--- a/bts.c
+++ b/bts.c
@@ -664,6 +664,12 @@ mouse(Mousectl *mc)
void
key(Rune r)
{
+ if(conclusion.s != nil){
+ resetgame();
+ nbsend(drawchan, nil);
+ return;
+ }
+
switch(r){
case Kdel:
case 'q':
@@ -677,11 +683,7 @@ key(Rune r)
if(game.state != Waiting0)
break;
chanprint(egress, "watch\n");
- default:
- if(conclusion.s != nil){
- resetgame();
- nbsend(drawchan, nil);
- }
+ break;
}
}