maze-blockly-wrapper 0.7.25 → 0.7.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,7 @@ interface DrawingGameProps {
12
12
  graphicsConfig?: Partial<GraphicsConfig>;
13
13
  initialXml?: string;
14
14
  language?: string;
15
+ stepInterval?: number;
15
16
  }
16
17
  interface DrawingGameState {
17
18
  gameState: DrawingState;
@@ -12,6 +12,7 @@ interface MazeGameProps {
12
12
  graphicsConfig?: Partial<GraphicsConfig>;
13
13
  initialXml?: string;
14
14
  language?: string;
15
+ stepInterval?: number;
15
16
  }
16
17
  interface MazeGameState {
17
18
  gameState: GameState;
package/dist/index.cjs.js CHANGED
@@ -10834,6 +10834,8 @@ class MazeGame extends React.Component {
10834
10834
  return false;
10835
10835
  }
10836
10836
  executeCommands(commands) {
10837
+ var _a;
10838
+ const stepInterval = (_a = this.props.stepInterval) != null ? _a : 800;
10837
10839
  let commandIndex = 0;
10838
10840
  this.executionInterval = setInterval(() => {
10839
10841
  if (this.state.gameState.isGameOver) {
@@ -10849,7 +10851,7 @@ class MazeGame extends React.Component {
10849
10851
  this.executeCommand(command);
10850
10852
  commandIndex++;
10851
10853
  this.setState({ currentCommandIndex: commandIndex });
10852
- }, 800);
10854
+ }, stepInterval);
10853
10855
  }
10854
10856
  executeCommand(command) {
10855
10857
  switch (command.type) {
@@ -13264,6 +13266,8 @@ class DrawingGame extends React.Component {
13264
13266
  };
13265
13267
  }
13266
13268
  executeCommands(commands) {
13269
+ var _a;
13270
+ const stepInterval = (_a = this.props.stepInterval) != null ? _a : 500;
13267
13271
  let commandIndex = 0;
13268
13272
  this.executionInterval = setInterval(() => {
13269
13273
  if (commandIndex >= commands.length) {
@@ -13274,7 +13278,7 @@ class DrawingGame extends React.Component {
13274
13278
  this.executeCommand(command);
13275
13279
  commandIndex++;
13276
13280
  this.setState({ currentCommandIndex: commandIndex });
13277
- }, 500);
13281
+ }, stepInterval);
13278
13282
  }
13279
13283
  executeCommand(command) {
13280
13284
  switch (command.type) {