Advent of Code 2019 Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
1.1 KiB

import System.Environment
import Data.Char
import Data.List.Split
import qualified Data.Map.Strict as Map
import Intcode
main = do
input <- getArgs
let parsed = parseProg $ input!!0
let directions = ["NOT A J",
"AND B J",
"NOT A T",
"AND C T",
"OR T J",
"NOT B T",
"AND D T",
"OR T J",
"NOT C T",
"AND D T",
"OR T J",
"WALK"]
putStr $ parseOutput $ computeTilHalt $ startingState parsed $ parseInput directions
let directions = ["NOT A J",
"AND B J",
"NOT A T",
"AND C T",
"OR T J",
"NOT B T",
"AND D T",
"OR T J",
"NOT C T",
"AND D T",
"AND H T",
"OR T J",
"RUN"]
putStr $ parseOutput $ computeTilHalt $ startingState parsed $ parseInput directions