diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2019-12-22 00:14:40 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2019-12-22 00:14:40 +0200 |
commit | 97087f6e1ab5a9260ab1a6a8d9791dba09bf9de8 (patch) | |
tree | 26b326216c855906dcfaa04a3a385180535ad251 /src/lib.rs | |
parent | 47eabec40889d650834a244cb1951eca14c3e5ad (diff) |
Day 13: Pong AI done
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -71,6 +71,10 @@ pub fn bool_to_intcode(i: bool) -> Intcode { } impl IntcodeProgram { + pub fn with_mem_0(&self, val: Intcode) -> IntcodeProgram { + self.with_memory_set(0.into(), val) + } + pub fn with_noun_verb_input(&self, noun: Intcode, verb: Intcode) -> IntcodeProgram { self.with_memory_set(1.into(), noun) .with_memory_set(2.into(), verb) |