Exemple #1
0
        //View

        //Other
        public void newTeam(int number, string binary)
        {
            Team team = new Team(number, binary);
            for (int i = 0; i < teams.Length; i++)
            {
                if (teams[i] == null)
                {
                    teams[i] = team;
                    break;
                }
            }
        }
Exemple #2
0
 private void btnMatchTeam_Click(object sender, EventArgs e)
 {
     Team input = searchNumber(teams, int.Parse(tbMatchTeam.Text));
     if (input != null)
     {
         selected = input;
         lblMatchTeam.Text = "Team: " + selected.number;
     }
     else
     {
         lblMatchTeam.Text = "Team: ";
     }
 }
Exemple #3
0
 public Team searchNumber(Team[] teams, int number)
 {
     foreach (Team team in teams)
     {
         if (team != null)
         {
             if (team.number == number)
             {
                 return team;
             }
         }
     }
     return null;
 }