aboutsummaryrefslogtreecommitdiff
path: root/btsd.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-09-10 18:56:15 +0000
committerrodri <rgl@antares-labs.eu>2023-09-10 18:56:15 +0000
commit118df45d3740cc6a391e181e60aeaef7571c5e0b (patch)
treea8d67fec57eca6fd919a659032dc1a09dcb6e850 /btsd.c
parent230cd15dfa5fc602639f0d55080ae2ff8794c5ba (diff)
downloadbattleship-118df45d3740cc6a391e181e60aeaef7571c5e0b.tar.gz
battleship-118df45d3740cc6a391e181e60aeaef7571c5e0b.tar.bz2
battleship-118df45d3740cc6a391e181e60aeaef7571c5e0b.zip
fixed game-breaking typo.
Diffstat (limited to 'btsd.c')
-rw-r--r--btsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btsd.c b/btsd.c
index 9fa80a3..1177c0c 100644
--- a/btsd.c
+++ b/btsd.c
@@ -177,7 +177,7 @@ battleproc(void *arg)
settile(op, cell, Thit);
write(p->fd, "hit\n", 4);
fprint(op->fd, "hit %s\n", cell2coords(cell));
- if(countshipcells(op) < 17){
+ if((debug && countshipcells(op) < 17) || (!debug && countshipcells(op) < 1)){
write(p->fd, "win\n", 4);
write(op->fd, "lose\n", 5);
sendp(playerq, p);