コード例 #1
0
ファイル: Gameoffline.xaml.cs プロジェクト: hdlinhit95/GOMOKU
        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
ファイル: Gameoffline.xaml.cs プロジェクト: hdlinhit95/GOMOKU
        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
ファイル: Gameoffline.xaml.cs プロジェクト: hdlinhit95/GOMOKU
 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
ファイル: Gameoffline.xaml.cs プロジェクト: hdlinhit95/GOMOKU
        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();
            }

           
            
            
            
        }