public Game() { InitializeComponent(); gomoku = new Gomoku(_Board); gomoku.DrawBoard(); gomoku.InitArrayOco(); NewSocket(); }
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(); } } }