def create_match(home_team, away_team)
      home_team, away_team = away_team, home_team unless home_team
      raise 'Invalid match' unless home_team

      build_match(home_team, away_team)
    end
def create_match(home_team, away_team)
      home_team, away_team = away_team, home_team unless home_team
      raise 'Invalid match' unless home_team

      build_match(home_team, away_team)
    end
Create a match. Used by tournament systems.

 Specially handles byes, swapping home/away if required.

 @param home_team [team, nil]
 @param away_team [team, nil]
 @return [nil]
 @raise when both teams are +nil+