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.
13 lines (10 loc) • 414 B
text/typescript
import { always, curry } from 'ramda'
import { match } from 'ts-pattern'
import { addBonusAction } from '../board/frame'
import { GameCommandEnum, GameStatePlaying } from '../types'
export const castle = () => addBonusAction(GameCommandEnum.SETTLE)
export const complete = curry((partial: string[], _state: GameStatePlaying): string[] =>
match(partial)
.with([], always(['']))
.otherwise(always([]))
)