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.
22 lines (19 loc) • 518 B
text/typescript
import { match } from 'ts-pattern'
import { always, curry } from 'ramda'
import { getCost, withActivePlayer } from '../board/player'
import { GameStatePlaying, StateReducer } from '../types'
export const houseboat = (): StateReducer => {
return withActivePlayer(
getCost({
wood: 1,
malt: 1,
penny: 1,
peat: 1,
})
)
}
export const complete = curry((partial: string[], _state: GameStatePlaying): string[] =>
match(partial)
.with([], always(['']))
.otherwise(always([]))
)