mirror of
https://codeberg.org/beerbrawl/beerbrawl.git
synced 2024-09-23 05:40:51 +02:00
refactor(#23): move variable closer to where it is needed to fix style issue
This commit is contained in:
parent
960a6fede9
commit
09e9686dad
|
@ -108,8 +108,6 @@ public class TournamentServiceImpl implements TournamentService {
|
|||
for (int i = 0; i < teams.size(); i++) {
|
||||
var team = teams.get(i);
|
||||
|
||||
Team opponentLeft = teams.get(Math.floorMod(i - 1, teams.size()));
|
||||
|
||||
var match = new QualificationMatch();
|
||||
qualificationRepository.saveAndFlush(match);
|
||||
matches.add(match);
|
||||
|
@ -117,6 +115,8 @@ public class TournamentServiceImpl implements TournamentService {
|
|||
var teamParticipation = new QualificationParticipation();
|
||||
teamParticipation.setTeam(team);
|
||||
teamParticipation.setQualificationMatch(match);
|
||||
|
||||
Team opponentLeft = teams.get(Math.floorMod(i - 1, teams.size()));
|
||||
var opponentParticipation = new QualificationParticipation();
|
||||
opponentParticipation.setTeam(opponentLeft);
|
||||
opponentParticipation.setQualificationMatch(match);
|
||||
|
|
Loading…
Reference in a new issue