Clarify the 48 magic number

This commit is contained in:
Daniel Flanagan 2021-12-02 11:16:53 -06:00
parent ea0a467b5c
commit 9665ad2a21
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -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]: