Clarify the 48 magic number
This commit is contained in:
parent
ea0a467b5c
commit
9665ad2a21
1 changed files with 1 additions and 1 deletions
|
@ -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]:
|
||||
|
|
Loading…
Reference in a new issue