private void InitAiGame() { gameWindow.Title = "中国象棋-人机"; viewBoard = gameWindow.Board; board = gameWindow.Board.ChessBoard; gameWindow.Board.ClickPos += OnClickPos; }
public HumanGame(LocalSocket socket, ChessFlag flag) { selfFlag = flag; gameWindow = new GameWindow(); gameWindow.Title = "中国象棋-双人"; viewBoard = gameWindow.Board; viewBoard.UpChessFlag = (flag == ChessFlag.BLACK) ? ChessFlag.RED : ChessFlag.BLACK; viewBoard.ClickPos += OnClickPos; board = viewBoard.ChessBoard; this.socket = socket; socket.ReceivedOk += OnReceiveOk; socket.ReceivedMove += OnAnotherMove; if (flag == ChessFlag.RED) { turnSelf = true; } gameWindow.Closed += Exit; }