Skip to content

Instantly share code, notes, and snippets.

@mkock
Created August 20, 2020 19:20
Show Gist options
  • Select an option

  • Save mkock/3fea7e84e9490445970dcf68b5c51ec9 to your computer and use it in GitHub Desktop.

Select an option

Save mkock/3fea7e84e9490445970dcf68b5c51ec9 to your computer and use it in GitHub Desktop.
Bus Ride, code snippet 22
> go run main.go
Starting simulation
Express Line: starting
Express Line: arriving at "Downtown"
Express Line: boarded passenger with SSN "123456-1222"
Express Line: boarded passenger with SSN "112233-2223"
    Passenger with SSN "123456-1222" is heading to "The University"
    Passenger with SSN "112233-2223" is heading to "The Village"
Express Line: carrying 2 passengers: heading for next stop
Express Line: arriving at "The University"
Express Line: unboarded passenger with SSN "123456-1222"
    Passenger with SSN "112233-2223" is heading to "The Village"
Express Line: reached the end of the line, everybody out
Express Line: unboarded passenger with SSN "112233-2223"
Simulation done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment