shithub: battleship

Download patch

ref: 651db54ad2917ea0e055b74047201ef0b6022e63
parent: b6bc5d9b2c4fdb5b49042a98541e6f9758debe66
author: rodri <[email protected]>
date: Fri Sep 15 18:11:38 EDT 2023

really allow any key to be pressed to continue.

--- a/bts.c
+++ b/bts.c
@@ -664,6 +664,12 @@
 void
 key(Rune r)
 {
+	if(conclusion.s != nil){
+		resetgame();
+		nbsend(drawchan, nil);
+		return;
+	}
+
 	switch(r){
 	case Kdel:
 	case 'q':
@@ -677,11 +683,7 @@
 		if(game.state != Waiting0)
 			break;
 		chanprint(egress, "watch\n");
-	default:
-		if(conclusion.s != nil){
-			resetgame();
-			nbsend(drawchan, nil);
-		}
+		break;
 	}
 }