Firstly I wanted to thank Derek for writing this nice book. The examples used in this book are fun and clear.
Now I have a question with respect to Ch 9.4(p.251 in the printed book) where it explains the reason why there are two setCourse is FlyingBehaviour only accepts Fly message in the Flying state. I'm a bit confused about this. I suspect that it meant Idle state, since FlyingBehaviour can fall back to Idle in many situations so we need to send Fly message again i.e.
override def unhandled(msg: Any): Unit = { msg match { case Transation(_, _, Flying) => // ??? // setCourse(sender) case Transation(_, _, Idle) => setCourse(sender) ... } }