|
@@ -1,5 +1,4 @@
|
|
|
const Stack = require("./Stack");
|
|
|
-const ComputerParameterMode = require('./ComputerParameterMode');
|
|
|
|
|
|
/**
|
|
|
* An Intcode Computer for the Advent of Code 2019 challenge
|
|
@@ -15,8 +14,11 @@ module.exports = class Computer {
|
|
|
OUTPUT: 4,
|
|
|
HALT: 99,
|
|
|
};
|
|
|
-
|
|
|
- this.paramMode = ComputerParameterMode.POSITION_MODE;
|
|
|
+ this.PARAMETER_MODES = {
|
|
|
+ POSITION_MODE: 0,
|
|
|
+ IMMEDIATE_MODE: 1,
|
|
|
+ }
|
|
|
+ this.paramMode = this.PARAMETER_MODES.POSITION_MODE;
|
|
|
}
|
|
|
|
|
|
/**
|