FSM Simulated using a Simulated Robot designed with a Factory Pattern