Skip to content

Commit 2176304

Browse files
committed
Day 2, now with 100% less funny error messages
1 parent c80b801 commit 2176304

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

2022/day2/solve.self

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@
3131
you = 'Y' ifTrue: [ ^ winState loss ].
3232
you = 'Z' ifTrue: [ ^ winState draw ].
3333
].
34-
_Error: 'Bruh'.
34+
_Error: 'Unknown state'.
3535
).
3636

3737
bonusFor: state = (
3838
state == winState win ifTrue: [ ^ 6 ].
3939
state == winState draw ifTrue: [ ^ 3 ].
4040
state == winState loss ifTrue: [ ^ 0 ].
41-
_Error: 'Unknown state ', state.
41+
_Error: 'Unknown state'.
4242
).
4343

4444
scoreFor: you = (
4545
you = 'X' ifTrue: [ ^ 1 ].
4646
you = 'Y' ifTrue: [ ^ 2 ].
4747
you = 'Z' ifTrue: [ ^ 3 ].
48-
_Error: 'oh nah m8'.
48+
_Error: 'Unknown state'.
4949
).
5050

5151
total
@@ -85,14 +85,14 @@
8585
him = 'B' ifTrue: [ ^ 1 ].
8686
him = 'C' ifTrue: [ ^ 2 ].
8787
].
88-
_Error: 'Bruh'.
88+
_Error: 'Unknown state'.
8989
).
9090

9191
scoreFor: you = (
9292
you = 'Z' ifTrue: [ ^ 6 ].
9393
you = 'Y' ifTrue: [ ^ 3 ].
9494
you = 'X' ifTrue: [ ^ 0 ].
95-
_Error: 'oh nah m8'.
95+
_Error: 'Unknown state'.
9696
).
9797

9898
total.

0 commit comments

Comments
 (0)