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