/// <summary> /// 将棋盤の局面を設定します。 /// </summary> public void SetBoard(Board board, Move move, bool isUndo = false) { if (Shogi == null) { return; } FormsUtil.UIProcess(() => Shogi.SetBoard(board, move, isUndo)); }
/// <summary> /// 将棋盤の局面を進めます。 /// </summary> public void DoMove(Move move, MoveFlags flags = MoveFlags.DoMoveDefault) { if (Shogi == null) { return; } using (LazyLock()) { if (!CanMove || !Board.DoMove(move, flags)) { return; } FormsUtil.UIProcess(() => Shogi.SetBoard(Board, move)); } }
/// <summary> /// 将棋盤の局面を進めます。 /// </summary> public void Redo() { if (Shogi == null) { return; } using (LazyLock()) { if (!CanMove) { return; } var move = Board.Redo(); if (move == null) { return; } FormsUtil.UIProcess(() => Shogi.SetBoard(Board, move, false)); } }