Fix instant-win bug: first round no longer skipped when min-players is 1
Build / build (push) Successful in 1m15s

This commit is contained in:
Michael Burgess
2026-08-07 07:37:29 -04:00
parent f470b30130
commit 2a04392942
@@ -264,8 +264,15 @@ public class Arena {
}
private void startNextRound() {
if (EliminationLogic.isMatchOver(players.size())) {
endMatch(players.isEmpty() ? null : (players.isEmpty() ? null : players.get(0)));
if (players.isEmpty()) {
endMatch(null);
return;
}
// Only treat "down to one player" as a win once at least one round has actually been
// played (round > 0). At round 0 (the very first round after the countdown), a single
// player is expected whenever min-players is configured as 1 for solo play/testing.
if (round > 0 && EliminationLogic.isMatchOver(players.size())) {
endMatch(players.get(0));
return;
}
round++;