https://adventofcode.com/2016/day/2
A solution by Theo Vora (@theevo)
- tvOS
- SwiftUI
- OperationQueue
I animated the deciphering of a secret code on Apple TV.
adventofcode.com has a bunch of code puzzles to solve. This puzzle from 2016 Day 2 requires you to determine the answer of a 5 character password. The input file needed to decipher the password is over 2000 characters long!
I solved the puzzle using Swift as my programing language but to make the presentation more interesting, I built the app with tvOS. I was going for the look of pseudo-hacker movies or TV shows where you can "see" the code has it's being unscrambled.
Funny fact: I had to slow the unscrambling down by a factor of 66. Otherwise, you'd never see the code being unscrambled. The computer is so fast that it can crunch through all that work by the time you lift your finger off the play button!
- Clone/Download
- Open AoC2016-D02.xcodeproj
- ⌘R to run
- Output will appear in Simulator.
- Press play to see the solution.