MCPcopy Create free account
hub / github.com/codecombat/codecombat / popUndoCommands

Method popUndoCommands

ozaria/engine/cinematic/UndoSystem.js:55–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 // Pop commands required to undo effects as well as forward commands to shift
54 // on the command list.
55 popUndoCommands () {
56 if (this.additionalCommandStateStack.length === 0) {
57 throw new Error('There are no undo commands to undo.')
58 }
59 const undoCommands = this.additionalCommandStateStack.pop()
60 undoCommands.reverse()
61 return {
62 forwardCommands: this.undoCommandStack.pop(),
63 undoCommands
64 }
65 }
66
67 /**
68 * Pushes a single undo effect command. Used to undo effect operations.

Callers 1

undoShotMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected