def trapSimulation(self, board, report, pool):
        '''Simulate different moves to trap opponent.'''
        for coordinate in pool:
            simulatedBoard = ticBoard('copy',board)
            simulatedBoard.place(self.getSymbol(),coordinate)
            simulatedDoubles = board.returnDoubles(simulatedBoard.fieldReport())
            soDoubles = {key:simulatedDoubles[key] for key in simulatedDoubles if 'O' in simulatedDoubles[key]}
            sxDoubles = {key:simulatedDoubles[key] for key in simulatedDoubles if 'X' in simulatedDoubles[key]}
            if len(soDoubles) == 0 and len(sxDoubles) > 1:
                debug(d,'Trapping')
                return {'trap':True, 'entry':coordinate}
        return {'trap':False, 'entry':coordinate}
Simulate different moves to trap opponent.
recipes/Python/580723_TicTacToe_text_based/recipe-580723.py