From 15aff2160950854f57c78e67e7dcd3a4bcd8b115 Mon Sep 17 00:00:00 2001 From: akupiec Date: Tue, 26 Jan 2021 21:44:52 +0100 Subject: [PATCH] undo / and simple redo - performance footprint --- src/js/game/history_manager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/game/history_manager.js b/src/js/game/history_manager.js index f3c31758..37424d3f 100644 --- a/src/js/game/history_manager.js +++ b/src/js/game/history_manager.js @@ -29,15 +29,15 @@ class LiFoQueue { } const ActionType = { - add: "ADD", - remove: "REMOVE", + add: 0, + remove: 1, }; export class HistoryManager { constructor(root) { this.root = root; - this._forUndo = new LiFoQueue(); - this._forRedo = new LiFoQueue(); + this._forUndo = new LiFoQueue(100); + this._forRedo = new LiFoQueue(20); this.initializeBindings(); }