Reject move commands in non-cardinal directions
This commit is contained in:
parent
0e731df1a3
commit
c2e3c9f090
4 changed files with 23 additions and 9 deletions
|
@ -215,7 +215,7 @@ func InnerMain(command string, args ...string) error {
|
|||
i++
|
||||
if len(args) == i {
|
||||
return fmt.Errorf("move command must be passed bearing")
|
||||
} else if _, err := maths.FromString(args[i]); err != nil {
|
||||
} else if _, err := maths.BearingFromString(args[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
commands = append(commands,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue