UNPKG

hathora-et-labora-game

Version:

Plays Uwe Rosenberg's Ora et Labora for the Hathora engine. It reduces a list of moves into a board game state.

10 lines (8 loc) 350 B
import { Clergy, Tile } from '../types' export const tileWithoutClergy = (denyList: Clergy[]) => (landStack: Tile) => { if (landStack.length === 0) return landStack const [terrain, building, clergy] = landStack if (clergy === undefined) return landStack if (denyList.includes(clergy)) return [terrain, building] as Tile return landStack }