aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);