Пример #1
0
        private void ButtonPvsCOM_Click(object sender, RoutedEventArgs e)
        {
            if (gameoffline._Ready == false)
            {
                Started = 2;

                PVSC x = new PVSC();

                x.ShowDialog();
                NamePlayer1.Content   = x.Name();
                NamePlayer2.Content   = "COM";
                gameoffline.NamePlay2 = x.Name();
                gameoffline.NamePlay1 = "COM";
                gameoffline.DrawBoard();
                gameoffline.InitArrayOco();
                gameoffline._Ready = true;
            }
            else
            {
                Started = 2;
                PVSC x = new PVSC();
                x.ShowDialog();
                NamePlayer1.Content   = x.Name();
                NamePlayer2.Content   = "COM";
                gameoffline.NamePlay2 = x.Name();
                gameoffline.NamePlay1 = "COM";
                gameoffline.Start_P_Com();
            }
        }
Пример #2
0
        private void ButtonNewgame_Click(object sender, RoutedEventArgs e)
        {

            if (Started == 0)
           {
               PVSP X = new PVSP();
               X.ShowDialog();
               NamePlayer1.Content = X.getPlay1();
               NamePlayer2.Content = X.getPlay2();
               gameoffline.NamePlay1 = X.getPlay1();
               gameoffline.NamePlay2 = X.getPlay2();
               gameoffline.DrawBoard();
               gameoffline.InitArrayOco();
               gameoffline.Start_PvsP();
               Started = 1;
           }
           else
           {
                if (Started == 2)
                {
                    PVSC x = new PVSC();
                    x.ShowDialog();
                    NamePlayer1.Content = x.Name();
                    NamePlayer2.Content = "COM";
                    gameoffline.NamePlay1 = x.Name();
                    gameoffline.NamePlay2 = "COM";
                    gameoffline.Start_P_Com();

                }
                else
                {
                    PVSP X = new PVSP();
                    X.ShowDialog();
                    NamePlayer1.Content = X.getPlay1();
                    NamePlayer2.Content = X.getPlay2();
                    gameoffline.NamePlay1 = X.getPlay1();
                    gameoffline.NamePlay2 = X.getPlay2();
                    gameoffline.Start_PvsP();
                    
                }
            }
                
            
            
            
        }
Пример #3
0
 private void ButtonNewgame_Click(object sender, RoutedEventArgs e)
 {
     if (Started == 0)
     {
         PVSP X = new PVSP();
         X.ShowDialog();
         NamePlayer1.Content   = X.getPlay1();
         NamePlayer2.Content   = X.getPlay2();
         gameoffline.NamePlay1 = X.getPlay1();
         gameoffline.NamePlay2 = X.getPlay2();
         gameoffline.DrawBoard();
         gameoffline.InitArrayOco();
         gameoffline.Start_PvsP();
         Started = 1;
     }
     else
     {
         if (Started == 2)
         {
             PVSC x = new PVSC();
             x.ShowDialog();
             NamePlayer1.Content   = x.Name();
             NamePlayer2.Content   = "COM";
             gameoffline.NamePlay1 = x.Name();
             gameoffline.NamePlay2 = "COM";
             gameoffline.Start_P_Com();
         }
         else
         {
             PVSP X = new PVSP();
             X.ShowDialog();
             NamePlayer1.Content   = X.getPlay1();
             NamePlayer2.Content   = X.getPlay2();
             gameoffline.NamePlay1 = X.getPlay1();
             gameoffline.NamePlay2 = X.getPlay2();
             gameoffline.Start_PvsP();
         }
     }
 }
Пример #4
0
        private void ButtonPvsCOM_Click(object sender, RoutedEventArgs e)
        {
            if (gameoffline._Ready == false)
            {
                Started = 2;

                PVSC x = new PVSC();
                
                x.ShowDialog();
                NamePlayer1.Content = x.Name();
                NamePlayer2.Content = "COM";
                gameoffline.NamePlay2 = x.Name();
                gameoffline.NamePlay1 = "COM";
                gameoffline.DrawBoard();
                gameoffline.InitArrayOco();
                gameoffline._Ready = true;
            }
            else
            {
                Started = 2;
                PVSC x = new PVSC();
                x.ShowDialog();
                NamePlayer1.Content = x.Name();
                NamePlayer2.Content = "COM";
                gameoffline.NamePlay2 = x.Name();
                gameoffline.NamePlay1 = "COM";
                gameoffline.Start_P_Com();
            }

           
            
            
            
        }