import Shogi from '../src/shogi';
import * as CONST from '../constants/actionTypes';

const InitialState = {
  board: Shogi.Board,
  isHoldingPiece: undefined
};

const ShogiReducer = (state = InitialState, action) => {
  switch (action.type) {
  case CONST.MOVE_PIECE:
    // if empty piece click when no holding piece, do nothing.
    if (action.piece.type === '*' && typeof state.isHoldingPiece === 'undefined' ) {
      return state;
    }

    // if same piece click, release piece.
    if (state.isHoldingPiece) {
      if (state.isHoldingPiece.equals(action.piece)) {
        return Object.assign({}, state, { isHoldingPiece: undefined });
      }

      var newBoard = state.board.movePiece(state.isHoldingPiece, action.piece);

      return Object.assign({}, { board: newBoard }, { isHoldingPiece: undefined });
    } else {
      return Object.assign({}, state, { isHoldingPiece: action.piece });
    }
  default:
    return state;
  }
};

export default ShogiReducer;

@@ -238,16 +238,188 @@
 type) %7B%0A
+  case CONST.HOLD_PIECE:%0A    let newBoard = state.board.enhanceMovablePoint(action.piece);%0A    return Object.assign(%7B%7D, %7B board: newBoard, isHoldingPiece: action.piece %7D);%0A
   case C

Add HOLD_PIECE case section.