diff --git a/src/algo.ts b/src/algo.ts index 0dc2203..74c9ee4 100644 --- a/src/algo.ts +++ b/src/algo.ts @@ -147,7 +147,7 @@ export function isSolvable(result: number, plaquettes: number[]): boolean { ) } - if (histories.length) { + if (histories.length && import.meta.env.DEV) { printHistory(histories[0]) } return found diff --git a/src/components/OperationsList.vue b/src/components/OperationsList.vue index d22e77b..a24f97e 100644 --- a/src/components/OperationsList.vue +++ b/src/components/OperationsList.vue @@ -72,7 +72,7 @@ import { result, } from '@/composables/game-state' import { operatorIcons } from '@/composables/operators' -import { GameState } from '@/globals' +import { GameStateType } from '@/globals' import { Operation } from '@/types' import IconEquals from '~icons/ph/equals-bold' import IconSad from '~icons/ph/smiley-sad' @@ -85,7 +85,7 @@ function canOperationBeDeleted(op: Operation): boolean { } function undoOperation(index: number): void { - if (gameState.value !== GameState.Playing) return + if (gameState.value !== GameStateType.Playing) return const len = operations.length for (let i = len - 1; i >= index; --i) { let popped: Operation diff --git a/src/components/PlaquettesList.vue b/src/components/PlaquettesList.vue index de534a2..e4c5f60 100644 --- a/src/components/PlaquettesList.vue +++ b/src/components/PlaquettesList.vue @@ -1,6 +1,10 @@