public string GetFormattedString() { if (IsLeaf) { return(new string(' ', Depth) + $"-{Entrant.ToString()}"); } else { return(new string(' ', Depth) + "|"); } }
public void Split(Entrant newEntrant) { if (Left is null && Right is null) { Left = new BracketNode(this) { Entrant = Entrant }; Right = new BracketNode(this) { Entrant = newEntrant }; Entrant = null; } }
public Entrant(Entrant entrant) { Name = entrant.Name; Player = entrant.Player; }
public BracketNode Find(Entrant entrant) { return(Root.Find(entrant)); }
public BracketNode Find(Entrant entrant) { return(Entrant != null && Entrant.Value == entrant ? this : Left?.Find(entrant) ?? Right?.Find(entrant)); }