Day 3-6 2019
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package be.vandewalleh.aoc.intcode;
|
||||
|
||||
public enum Mode {
|
||||
Positional, Immediate;
|
||||
|
||||
public static Mode of(char representation) {
|
||||
if (representation == '0') return Mode.Positional;
|
||||
else if (representation == '1') return Mode.Immediate;
|
||||
else throw new IllegalArgumentException("Unsupported Mode " + representation);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user