예제 #1
0
 public Game1()
 {
     InitializeComponent();
     gomoku = new Gomoku(_Board);
     gomoku.DrawBoard();
     gomoku.InitArrayOco();
     NewSocket();
 }
예제 #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();
         }
     }
 }