mirror of
https://github.com/Stone-Red-Code/StoneRed.LogicSimulator.git
synced 2026-09-04 00:56:23 +02:00
18 lines
581 B
C#
18 lines
581 B
C#
using StoneRed.LogicSimulator.Api;
|
|
using StoneRed.LogicSimulator.Api.Attributes;
|
|
|
|
namespace StoneRed.LogicSimulator.Simulation.LogicGates;
|
|
|
|
[LogicGateName("Or Gate")]
|
|
[LogicGateDescription("A or gate is a gate that returns true if at least one of the inputs is true.")]
|
|
internal class OrGate : LogicGate
|
|
{
|
|
public override int InputCount { get; set; } = 1;
|
|
|
|
public override int OutputCount { get; set; } = 1;
|
|
|
|
protected internal override void Register(ICircuitSimulator circuitSimulator)
|
|
{
|
|
SimulatorGateId = circuitSimulator.AddGate(GateKind.Or2);
|
|
}
|
|
} |