def counter(self, doubles):
        '''Either place winning piece or stop opponent from winning.'''
        if doubles != {}:
            triad = doubles.popitem()
            entry = self.analyzeMap(self.mapCoordinates(triad))
            debug(d,'Countering')
            return {'counter':True, 'entry':entry}
        return {'counter':False, 'entry':''}
Either place winning piece or stop opponent from winning.
recipes/Python/580723_TicTacToe_text_based/recipe-580723.py