using System; using System.Collections.Generic; using System.Text; using DNAModule.Sunweaver.DataPrototypes; namespace DNAModule.Sunweaver.Commands.Abstracts { public abstract class BinaryBooleanLogic : BasePair { protected VirtualMachine VM = null; public override void Implementation(VirtualMachine VM) { if (VM.BoolStack.Count() < 2) return; bool b = VM.BoolStack.Pop(); bool a = VM.BoolStack.Pop(); this.VM = VM; Operation(a, b); } /// /// Abstract interface that child classes implement /// /// Top value from the bool stack /// Second to top value on the bool stack public abstract void Operation(bool a, bool b); } }