From 9665ad2a21c2d5b132180be29458afb8837d2522 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 2 Dec 2021 11:16:53 -0600 Subject: [PATCH] Clarify the 48 magic number --- 2021/two.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2021/two.nim b/2021/two.nim index 6337de2..4bf23ba 100644 --- a/2021/two.nim +++ b/2021/two.nim @@ -4,7 +4,7 @@ import ./common type SubmarineCommand = enum Forward, Up, Down -proc parseArg(c: char): int = c.int() - 48 +proc parseArg(c: char): int = c.int() - int('0') proc parseSubmarineCommand(l: string): (SubmarineCommand, int) = case l[0]: