commit 8796e4160dc82139cae346511ea0ae4b495e6b45 parent 60ebc25db0b0c86e4bbf6f35898e7711fad9e30a Author: n0tr1v <n0tr1v@protonmail.com> Date: Fri, 30 Dec 2022 23:24:11 -0800 fix winning condition Diffstat:
| M | pkg/web/handlers/api/v1/werewolf.go | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/web/handlers/api/v1/werewolf.go b/pkg/web/handlers/api/v1/werewolf.go @@ -426,7 +426,7 @@ func (b *Werewolf) StartGame() { if b.werewolfSet.Len() == 0 { b.Narrate("Townspeople win", nil, nil) break - } else if b.townspersonSet.Len() == 1 { + } else if b.townspersonSet.Len() <= 1 { b.Narrate("Werewolf win", nil, nil) break }