From 7b500eca53b4133b13bd53c1f871daa979bf7e8c Mon Sep 17 00:00:00 2001 From: Drew Malzahn Date: Wed, 11 Feb 2026 19:09:49 -0500 Subject: [PATCH] Start Day 02 --- odin/day02/day02.odin | 11 ++++++++++- odin/day02/{strategy.input => test.txt} | 0 2 files changed, 10 insertions(+), 1 deletion(-) rename odin/day02/{strategy.input => test.txt} (100%) diff --git a/odin/day02/day02.odin b/odin/day02/day02.odin index fcaa95e..38e619c 100644 --- a/odin/day02/day02.odin +++ b/odin/day02/day02.odin @@ -37,6 +37,15 @@ determine_score :: proc(friendly: Move, enemy: Move) -> int { return result + int(friendly) } +determine_score_alt :: proc(friendly: Move, outcome: Move) -> int { + // X = lose round + // Y = draw round + // Z = win round + // 3 defeats 2, 2 defeats 1, 1 defeats 3 + // If w := enemy input and v := friendly input, then w = (v - 1) % 2 is a defeat + return 0 +} + main :: proc () { init() if len(os.args) < 2 { @@ -92,4 +101,4 @@ main :: proc () { } delete(rune_move); fmt.printf("Your score is: %d\n", total_score) -} \ No newline at end of file +} diff --git a/odin/day02/strategy.input b/odin/day02/test.txt similarity index 100% rename from odin/day02/strategy.input rename to odin/day02/test.txt