def start(self): # for car in cars: # nextAction = AI.nextStep(car.id, state) # state = state.getStateByAction(car.id, nextAction) # Drawer.draw(state) # Start currCarIdx = 0 nextAction = AI.nextStep(currCarIdx, state) state = state.getStateByAction(currCarIdx, nextAction) Drawer.draw(state) while(not state.isGoal()): nextCarIdx = self.getNextCarIdx(currCarIdx) nextAction = AI.nextStep(currCarIdx, state) state = state.getStateByAction(currCarIdx, nextAction) Drawer.draw(state)