Ejemplo n.º 1
0
 internal ChessPacketHandler(NetworkPlayer p, ChessBoard board)
 {
     this.player = p;
     this.board = board;
 }
Ejemplo n.º 2
0
 public override void PlayServer(NetworkInterface comm)
 {
     comm.Disconnected += new OpponentDisconnected(comm_Disconnected);
     localInterface = comm;
     Material[] pieces = SetDefaultPieces();
     highlightedSquares.Clear();
     twoPlayers = false;
     NetworkPlayer p = new NetworkPlayer(this, true, pieces[0]);
     whitePlayer = p;
     blackPlayer = new LocalPlayer(this, false, comm, pieces[1]);
     comm.Handler = new ChessPacketHandler(p, this);
     turn = Turn.NETWORK_OPPONENT_WHITE;
     moveLabel.Text = "";
     turnLabel.Text = "White's turn.";
     whiteOnBottom = false;
     mnu.DisableEntry("Options", "Flip Board Each Turn");
     NewGameMenuUpdate(false, true, true);
 }