Ejemplo n.º 1
0
    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 });
    }
Ejemplo n.º 2
0
    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 });
    }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
    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);
    }
Ejemplo n.º 6
0
 private static CellCoordinates[] FindFootprint(CellCoordinates _coordinates, ObjectOrientation _orientation)
 {
     return(GridObjectOrientationHelper.Find2x1Footprint(_coordinates, _orientation));
 }