diff options
Diffstat (limited to 'frontend/src/sagas/game.js')
-rw-r--r-- | frontend/src/sagas/game.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/frontend/src/sagas/game.js b/frontend/src/sagas/game.js index 04209e91..dc92e89a 100644 --- a/frontend/src/sagas/game.js +++ b/frontend/src/sagas/game.js @@ -49,6 +49,13 @@ function* sayReady(session: SevenWondersSession) { } } +function* prepareMove(session: SevenWondersSession) { + while (true) { + let action = yield take(types.REQUEST_PREPARE_MOVE); + yield apply(session, session.prepareMove, [action.move]); + } +} + function* watchTurnInfo(session: SevenWondersSession) { const channel = yield eventChannel(session.watchTurnInfo()); try { @@ -69,6 +76,7 @@ export function* gameSaga(session: SevenWondersSession) { call(watchTableUpdates, session, gameId), call(watchPreparedCards, session, gameId), call(sayReady, session), + call(prepareMove, session), call(watchTurnInfo, session) ]; } |