1.0.5 • Published 7 years ago

fsm-avalon v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

fsm-avalon

build status npm version

Install

npm install --save fsm-avalon

Usage

const { getFSM, actionCreators } = require('fsm-avalon');
const { reducer, getValidateError, getActions } = getFSM();

let state = reducer({}, actionCreators.startRound());

Actions

// init the game
initGame({
  users,
  isSetGoddess
});
// start the round
startRound();
// build the knights to mission
buildTeam({
  knights
});
// vote
vote({
  index,
  vote // -1 for reject, 1 for approve
});
// draw votes result
drawVotesResult();
// the knight execute mission
executeMission({
  index,
  mission // -1 for fail, 1 for success
});
// draw missions result
drawMissionsResult();
// assassin
assassin(index);
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago