UNPKG

hathora-et-labora-game

Version:

Game logic reducer for Uwe Rosenberg's Ora et Labora

22 lines (19 loc) 637 B
import { pipe } from 'ramda' import { withRondel, standardSesourceGatheringCompletion, standardSesourceGatheringAction, updateToken, } from '../board/rondel' import { ResourceEnum, StateReducer } from '../types' import { shortGameBonusProduction } from '../board/resource' export const clayMound = (param = ''): StateReducer => { const withJoker = param.includes(ResourceEnum.Joker) return pipe( // standardSesourceGatheringAction('clay', withJoker), withRondel(updateToken('clay', withJoker)), shortGameBonusProduction({ clay: 1 }) ) } export const complete = standardSesourceGatheringCompletion('clay')