hathora-et-labora-game
Version:
Game logic reducer for Uwe Rosenberg's Ora et Labora
7 lines • 490 B
JavaScript
import { lensPath, set } from 'ramda';
import { GameCommandEnum } from '../../types';
const frameBonusActions = lensPath(['frame', 'bonusActions']);
export const checkSoloSettlementReady = (state) => state &&
// if we start the frame with buildings, only allow building them, otherwise only allow settle (or commit)
set(frameBonusActions, state.buildings.length !== 0 ? [GameCommandEnum.BUILD] : [GameCommandEnum.SETTLE], state);
//# sourceMappingURL=checkSoloSettlementReady.js.map