'''
@author: Sam
'''

import random

from org.ggp.base.util.statemachine import MachineState
from org.ggp.base.util.statemachine.implementation.prover import ProverStateMachine

from org.ggp.base.player.gamer.statemachine import StateMachineGamer
from org.ggp.base.player.gamer.statemachine.reflex.event import ReflexMoveSelectionEvent

class PythonRandomGamer(StateMachineGamer):

    def getName(self):
        pass
        
    def stateMachineMetaGame(self, timeout):
        pass

    def stateMachineSelectMove(self, timeout):
        moves = self.getStateMachine().getLegalMoves(self.getCurrentState(), self.getRole())
        selection = random.choice(moves)
        self.notifyObservers(ReflexMoveSelectionEvent(moves, selection, 1))
        return selection
        
    def stateMachineStop(self):
        pass
        
    def stateMachineAbort(self):
        pass        
        
    def getInitialStateMachine(self):
        return ProverStateMachine()
@@ -178,18 +178,16 @@
 achine%0D%0A
-%0D%0A
 from org
@@ -251,98 +251,8 @@
 mer%0D
-%0Afrom org.ggp.base.player.gamer.statemachine.reflex.event import ReflexMoveSelectionEvent%0D
 %0A%0D%0Ac
@@ -595,85 +595,8 @@
 s)%0D%0A
-        self.notifyObservers(ReflexMoveSelectionEvent(moves, selection, 1))%0D%0A
     

Fix a bug in the example python gamer.