r/adventofcode • u/daggerdragon • Dec 02 '22
SOLUTION MEGATHREAD -🎄- 2022 Day 2 Solutions -🎄-
NEW AND NOTEWORTHY
All of our rules, FAQs, resources, etc. are in our community wiki.
A request from Eric: Please include your contact info in the User-Agent header of automated requests!
Signal boosting for the Unofficial AoC 2022 Participant Survey which is open early this year!
--- Day 2: Rock Paper Scissors ---
Post your code solution in this megathread.
Read the full posting rules in our community wiki before you post!
Include what language(s) your solution uses
Format your code appropriately! How do I format code?
Quick link to Topaz's
pasteif you need it for longer code blocks. What is Topaz'spastetool?
This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.
EDIT: Global leaderboard gold cap reached at 00:06:16, megathread unlocked!
103
Upvotes
27
u/jcbbjjttt Dec 02 '22 edited Dec 05 '22
Happy Day 2! [C#]
This puzzle can be completed by anyone who has learned the basics of coding. But, to help new programmers, I've put together a step by step guide video designed to allow watcher to pause and work on the problem step by step before seeing spoilers.
I hope others will find this video useful!
Although the solution is in C#, the video describes an approach that can be use in any language.
Here is the video for Day 2: https://youtu.be/gLlj_P8edJY
Final solution from video: https://github.com/jcollard/AdventOfCode2022/blob/jcollard/solution/Day2-RPS/Program.cs
Happy Coding!
Edit: Mention C# as the solution language