public override void PlayLocal() { localInterface = null; Material[] pieces = SetDefaultPieces(); highlightedSquares.Clear(); twoPlayers = true; whitePlayer = new LocalPlayer(this, true, null, pieces[0]); blackPlayer = new LocalPlayer(this, false, null, pieces[1]); turn = Turn.LOCAL_WHITE; whiteOnBottom = true; moveLabel.Text = ""; turnLabel.Text = "White's turn."; mnu.EnableEntry("Options", "Flip Board Each Turn"); NewGameMenuUpdate(true, false, false); }
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); }
public override void PlayFromSave() { localInterface = null; Material[] pieces = GetMaterial(); highlightedSquares.Clear(); twoPlayers = true; whitePlayer = new LocalPlayer(this, true, null, pieces[0]); blackPlayer = new LocalPlayer(this, false, null, pieces[1]); moveLabel.Text = ""; turnLabel.Text = (turn == Turn.LOCAL_WHITE ? "White's" : "Black's") + " turn."; whiteOnBottom = !flipBoard || turn == Turn.LOCAL_WHITE; mnu.EnableEntry("Options", "Flip Board Each Turn"); NewGameMenuUpdate(true, false, false); }