public BigInteger GetResult(IntCode intCode) { if (Mode == Modes.Param) { return(intCode.GetAddress(Value)); } if (Mode == Modes.Immed) { return(Value); } if (Mode == Modes.Rel) { int newAddress = RelativeBase + (int)Value; return(intCode.GetAddress(RelativeBase + Value)); } return(-999); }
public IntCodeProcessor(List <BigInteger> intCode) { Cursor = 0; IntC = new IntCode(new List <BigInteger>(intCode)); }