Created
August 20, 2020 19:11
-
-
Save mkock/a1dc2ab090fe43fbb13636eb10714ff9 to your computer and use it in GitHub Desktop.
Bus Ride, code snippet 14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // NotifyBoardingIntent is called by BusStop every time a Prospect arrives and instructs the Bus to signal its arrival at that BusStop. | |
| func (b *Bus) NotifyBoardingIntent(busStop *BusStop) { | |
| if b.StopsAt(busStop) { | |
| return // We already intend to stop here. | |
| } | |
| b.addBusStop(busStop) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment