Use non-playing counters
Gitea/swiss-backend/pipeline/head There was a failure building this commit

This commit is contained in:
michel committed 2026-10-29 18:49:55 +01:00
1 parent 1a1a0e373f
commit abab72cc02
2 files changed
+7 -17

No files matched your search

@@ -1,17 +0,0 @@
package nl.connectedit.swiss.domain;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class TournamentDivision {
private Long tournamentId;
private boolean divided;
private List<EventDivision> eventDivisions = new ArrayList<>();
}
@@ -223,12 +223,19 @@ public class TournamentPlayService {
public Tournament updateCounter(Tournament tournament, Long matchId, Long counter) {
var match = getMatch(tournament, matchId);
var matchCounter = match.getCounter();
if (matchCounter != null) {
var currentlyCountingPlayer = getTournamentPlayer(tournament, match.getCounter().getId());
currentlyCountingPlayer.setCounting(false);
}
if (counter == 999999) {UU
match.setCounter(null);
} else {
var newCountingPlayer = getTournamentPlayer(tournament, counter);
newCountingPlayer.setCounting(true);
match.setCounter(newCountingPlayer.getPlayer());
}
tournamentRepository.save(tournament);
return tournament;