示例#1
0
export const SearchTree = ({ gameState, searchDepth = 5 }) => {
  const shouldBuildPossibleNodes = currentDepth =>
    R.gt(R.subtract(searchDepth, currentDepth), 0);

  return Node({
    gameState,
    shouldBuildPossibleNodes,
    currentPlayer: R.call(gameState.getCurrentPlayer)
  });
};
示例#2
0
const iOrR = curry((iFn, rFn, target) => call(ifElse(
  isImmutable,
    iFn,
  rFn
), target));