Changed ban order to match typical tournament ban structure

This commit is contained in:
Rodrigo Pina 2023-11-29 11:22:07 +00:00
parent 2dd12a6725
commit 60d6c0fe53
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ private void setNextMode()
const TeamColour roll_winner = TeamColour.Red; //todo: draw from match
var nextColour = (CurrentMatch.Value.PicksBans.LastOrDefault()?.Team ?? roll_winner) == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
var previousBan = CurrentMatch.Value.PicksBans.LastOrDefault()?.Team ?? roll_winner;
var nextColour = (CurrentMatch.Value.PicksBans.Count() >= 2 ? CurrentMatch.Value.PicksBans[^2]?.Team : previousBan) == TeamColour.Red ? TeamColour.Blue : TeamColour.Red;
bool hasAllBans = CurrentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) >= totalBansRequired;