For this project, I used the state design pattern to control the behavior of the police officer and car. The police officer will pull over the car if it is travelling over the speed limit, perform checks, and let it go. Additionally, the car has several internal states: a travelling state, a getting pulled over state, and a pulled over state. The police officer and the car itself play a role in how the car transitions between its internal states.


Report: https://docs.google.com/document/d/1riP1osVxzkZtGN5lOxhGuYDo0Umrdi__4z8jqtiTgRw/...

Leave a comment

Log in with itch.io to leave a comment.