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.

4 lines 330 B
import { join, map, pipe, reduce, reject, split } from 'ramda'; import { initialState, reducer } from '.'; export const spiel = pipe(join(''), split('\n'), map((s) => s.trim()), reject((s) => s === ''), map((s) => s.split(' ')), reduce((state, command) => reducer(state, command), initialState)); //# sourceMappingURL=spiel.js.map