private static CellCoordinates[] FindOutputs(CellCoordinates _coordinates, ObjectOrientation _orientation) { CellCoordinates output1 = GridObjectOrientationHelper.Find1x1OffsetRight(_coordinates, _orientation); CellCoordinates output2 = GridObjectOrientationHelper.Find1x1OffsetDown(_coordinates, _orientation); return(new CellCoordinates[] { output1, output2 }); }
private static CellCoordinates[] FindInputs(CellCoordinates _coordinates, ObjectOrientation _orientation) { CellCoordinates input1 = GridObjectOrientationHelper.Find1x1OffsetLeft(_coordinates, _orientation); CellCoordinates input2 = GridObjectOrientationHelper.Find1x1OffsetUp(_coordinates, _orientation); return(new CellCoordinates[] { input1, input2 }); }
public OutputCell(CellCoordinates _coordinates, ObjectOrientation _orientation, int _target) : base(GridObjectType.Output, FindFootprint(_coordinates, _orientation)) { CurrentValues = new int[1]; OutputTarget = _target; Entry = GridObjectOrientationHelper.Find1x1OffsetLeft(_coordinates, _orientation); }
public InputCell(CellCoordinates _coordinates, ObjectOrientation _orientation, int _value) : base(GridObjectType.Input, FindFootprint(_coordinates, _orientation)) { CurrentValues = new int[1]; InputValue = _value; Exit = GridObjectOrientationHelper.Find1x1OffsetRight(_coordinates, _orientation); }
private static CellCoordinates[] FindInputs(CellCoordinates _coordinates, ObjectOrientation _orientation) { CellCoordinates[] footprint = GridObjectOrientationHelper.Find2x1Footprint(_coordinates, _orientation); CellCoordinates[] inputs = new CellCoordinates[footprint.Length]; for (uint i = 0; i < footprint.Length; ++i) { inputs[i] = GridObjectOrientationHelper.Find1x1OffsetLeft(footprint[i], _orientation); } return(inputs); }
private static CellCoordinates[] FindFootprint(CellCoordinates _coordinates, ObjectOrientation _orientation) { return(GridObjectOrientationHelper.Find2x1Footprint(_coordinates, _orientation)); }