Beispiel #1
0
        public int k1, k2, k3, k4; //= 3, k2 = 3, k3 = 3, k4 = 3;


        public void WriteTable(DataGridView d, Team t, int i)
        {
            d.Rows[i].Cells[0].Value = t.GetName();
            d.Rows[i].Cells[1].Value = t.GetW();
            d.Rows[i].Cells[2].Value = t.GetDraws();
            d.Rows[i].Cells[3].Value = t.GetLoses();
            d.Rows[i].Cells[4].Value = t.GetGoals();
            d.Rows[i].Cells[5].Value = t.GetPoints();
        }
Beispiel #2
0
        public void Sortuv(Team t1, Team t2, Team t3, Team t4)
        {
            arr[0] = t1.GetPoints();
            arr[1] = t2.GetPoints();
            arr[2] = t3.GetPoints();
            arr[3] = t4.GetPoints();

            for (int i = 0; i < 3; i++)
            {
                for (int j = i + 1; j < 4; j++)
                {
                    if (arr[i] < arr[j])
                    {
                        int tmp = arr[i];
                        arr[i] = arr[j];
                        arr[j] = tmp;
                    }
                }
            }

            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t1.GetPoints())
                {
                    k1 = i;
                    t1.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t2.GetPoints())
                {
                    k2 = i;
                    t2.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t3.GetPoints())
                {
                    k3 = i;
                    t3.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t4.GetPoints())
                {
                    k4 = i;
                    t4.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
        }
Beispiel #3
0
 public void WriteTable(DataGridView d, Team t, int i)
 {
     d.Rows[i].Cells[0].Value = t.GetName();
     d.Rows[i].Cells[1].Value = t.GetW();
     d.Rows[i].Cells[2].Value = t.GetDraws();
     d.Rows[i].Cells[3].Value = t.GetLoses();
     d.Rows[i].Cells[4].Value = t.GetGoals();
     d.Rows[i].Cells[5].Value = t.GetPoints();
 }
Beispiel #4
0
        public void Sortuv(Team t1, Team t2, Team t3, Team t4)
        {
            arr[0] = t1.GetPoints();
            arr[1] = t2.GetPoints();
            arr[2] = t3.GetPoints();
            arr[3] = t4.GetPoints();

            for (int i = 0; i < 3; i++)
            {
                for (int j = i + 1; j < 4; j++)
                {
                    if (arr[i] < arr[j])
                    {
                        int tmp = arr[i];
                        arr[i] = arr[j];
                        arr[j] = tmp;
                    }
                }
            }

            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t1.GetPoints())
                {
                    k1 = i;
                    t1.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t2.GetPoints())
                {
                    k2 = i;
                    t2.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t3.GetPoints())
                {
                    k3 = i;
                    t3.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
            for (int i = 0; i < 4; i++)
            {
                if (arr[i] == t4.GetPoints())
                {
                    k4 = i;
                    t4.Position(i);
                    arr[i] = -1;
                    break;
                }
            }
        }