fix: tie logic in KnockoutBracket

This commit is contained in:
2026-04-15 16:37:05 -04:00
Unverified
parent ad247b5765
commit f5f8e2bcdb
3 changed files with 92 additions and 71 deletions

View File

@@ -88,6 +88,19 @@ impl Match {
}
}
pub fn new_with_order(id: u32, player1: String, player2: String, demo_mode: bool) -> Match {
Match {
id,
demo_mode,
board: vec![vec![Color::None; 6]; 7],
ledger: Vec::new(),
wait_thread: None,
timeout_thread: None,
player1,
player2,
}
}
pub fn place_token(&mut self, color: Color, column: usize) {
for i in 0..6 {
if self.board[column][i] == Color::None {