private void btn_newgame_Click(object sender, RoutedEventArgs e) { type = 3; socket = IO.Socket("ws://gomoku-lajosveres.rhcloud.com:8000"); Connect.KetNoi(socket, txt_name.Text); drawBoard(); ban_co.IsEnabled = true; PlayerWin = 0; }
private void btn_machine_online_Click(object sender, RoutedEventArgs e) { type = 4; ban_co.IsEnabled = true; for (int x = 0; x < n; x++) { for (int y = 0; y < n; y++) { caro[x, y] = 0; } } drawBoard(); PlayerWin = 0; string connect = ConfigurationManager.ConnectionStrings["LINK_GOMOKU"].ConnectionString; socket = IO.Socket(connect); Connect.KetNoi(socket, txt_name.Text); }