示例#1
0
文件: Form1.cs 项目: Roofy5/TicTacToe
        private void ZmienWyglad(object button, int pozycja)
        {
            Button przycisk = button as Button;

            przycisk.Enabled = false;

            Pole pole = plansza.GetPole(pozycja);

            if (pole == Pole.Kolko)
            {
                przycisk.Text = "O";
            }
            if (pole == Pole.Krzyzyk)
            {
                przycisk.Text = "X";
            }
        }
示例#2
0
        private Status Sprawdz(int pole0, int pole1, int pole2)
        {
            Pole wynik0 = plansza.GetPole(pole0);
            Pole wynik1 = plansza.GetPole(pole1);
            Pole wynik2 = plansza.GetPole(pole2);

            return(PorownajPola(wynik0, wynik1, wynik2));
        }