Currently it says:
|
// Only allow UNDO / REDO if there is exactly one player |
|
// that can make moves right now and the person doing the |
|
// action is that player. |
|
if (action.type == UNDO || action.type == REDO) { |
|
if ( |
|
state.ctx.currentPlayer !== playerID || |
|
state.ctx.activePlayers !== null |
|
) { |
|
logging.error(`playerID=[${playerID}] cannot undo / redo right now`); |
|
return; |
|
} |
|
} |
But activePlayers can be non-null and there is only one valid player. For example:
activePlayers: {0: "selectColor"}
It seems to me that undo should be allowed in this case.
Currently it says:
boardgame.io/src/master/master.ts
Lines 242 to 253 in 60b32e5
But
activePlayerscan be non-null and there is only one valid player. For example:It seems to me that undo should be allowed in this case.