aoc-2019-c

Advent of Code 2019 Solutions in C
git clone https://git.sinitax.com/sinitax/aoc-2019-c
Log | Files | Refs | README | sfeed.txt

part2 (1089B)


      1--- Part Two ---
      2
      3The game didn't run because you didn't put in any quarters. Unfortunately, you did not bring any
      4quarters. Memory address 0 represents the number of quarters that have been inserted; set it to 2 to
      5play for free.
      6
      7The arcade cabinet has a joystick that can move left and right.  The software reads the position of
      8the joystick with input instructions:
      9
     10
     11 - If the joystick is in the neutral position, provide 0.
     12
     13 - If the joystick is tilted to the left, provide -1.
     14
     15 - If the joystick is tilted to the right, provide 1.
     16
     17
     18The arcade cabinet also has a segment display capable of showing a single number that represents the
     19player's current score. When three output instructions specify X=-1, Y=0, the third output
     20instruction is not a tile; the value instead specifies the new score to show in the segment display.
     21 For example, a sequence of output values like -1,0,12345 would show 12345 as the player's current
     22score.
     23
     24Beat the game by breaking all the blocks. What is your score after the last block is broken?
     25
     26