I have these methods in a class "driver":
- def act_left()
- def act_right()
- def act_straight()
When I call for init of that class I get an array of actions numbers between 0-2 and I translate these into the actions above. I thought about using switch-case but I found out there is no such thing in python 3.9. Do you know any elegant alternative, since I really has 10 of these actions and don't want to do a lot of else if's.
Thanks!