taoc2: fix whitespace - aoc22 - advent of code 2022 solutions | |
git clone git://src.adamsgaard.dk/aoc22 | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 3f41b850c443c7c2c2188db2b7fb528b1b1d7bba | |
parent 75a74ad3eda514d3351f5d200124c304d1354d39 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 2 Dec 2022 15:46:37 +0000 | |
aoc2: fix whitespace | |
Diffstat: | |
M 2/aoc2 | 6 ++---- | |
1 file changed, 2 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/2/aoc2 b/2/aoc2 | |
t@@ -5,7 +5,6 @@ BEGIN { | |
value["B"] = 2 # paper | |
value["C"] = 3 # scissors | |
} | |
- | |
{ | |
sub(/X/, "A") | |
sub(/Y/, "B") | |
t@@ -15,10 +14,9 @@ BEGIN { | |
sum += 3 | |
else { | |
if (($1 == "A" && $2 == "B") || | |
- ($1 == "B" && $2 == "C") || | |
- ($1 == "C" && $2 == "A")) | |
+ ($1 == "B" && $2 == "C") || | |
+ ($1 == "C" && $2 == "A")) | |
sum += 6 | |
} | |
} | |
- | |
END { print sum } |