Skip to content

Commit a2c64f8

Browse files
committed
increment turn before calling turn.onBegin
1 parent e20aca4 commit a2c64f8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/core/flow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ export function Flow({ moves, phases, endIf, turn, events, plugins }) {
318318
ctx = InitTurnOrderState(G, ctx, conf.turn);
319319
}
320320

321-
G = conf.turn.onBegin(G, ctx);
322-
323321
const turn = ctx.turn + 1;
324322
ctx = { ...ctx, turn, numMoves: 0, _prevActivePlayers: [] };
325323

324+
G = conf.turn.onBegin(G, ctx);
325+
326326
const plainCtx = ContextEnhancer.detachAllFromContext(ctx);
327327
const _undo = [{ G, ctx: plainCtx }];
328328

0 commit comments

Comments
 (0)