UNPKG

@logic-pad/core

Version:
30 lines (29 loc) 833 B
import Configurable from './configurable.js'; export default class Instruction extends Configurable { get configExplanation() { return this.explanation; } /** * Indicates that validation by logic is not available and the solution must be used for validation */ get validateWithSolution() { return false; } get necessaryForCompletion() { return true; } get visibleWhenSolving() { return true; } /** * Check if this instruction is equal to another instruction by comparing their IDs and configs. * * @param other The other instruction to compare to. * @returns Whether the two instructions are equal. */ equals(other) { if (this.id !== other.id) return false; return super.equals(other); } }