Reinstate BearingFromString function

This commit is contained in:
Marc Di Luzio 2020-07-19 13:13:09 +01:00
parent db8ed0302d
commit 57f668ae54
2 changed files with 21 additions and 5 deletions

View file

@ -427,7 +427,7 @@ func (w *World) Enqueue(rover string, commands ...Command) error {
switch c.Command {
case roveapi.CommandType_move:
if c.Bearing == roveapi.Bearing_BearingUnknown {
return fmt.Errorf("bearing must be cardinal")
return fmt.Errorf("bearing must be valid")
}
case roveapi.CommandType_broadcast:
if len(c.Message) > 3 {