def offensiveStrategy(self, board):
        '''Provide offensive move based on a certain tactic.'''
        if self.tactic == 'center':
            if len(board.blankSpaces()) == 9:
                debug(d,'Begin Center')
                return {'offensive':True, 'entry':'CM'}
            elif len(board.blankSpaces()) == 7:
                for corner in corners:
                    if board.board[corner] == 'O' and board.board[verticalFlip[horizontalFlip[corner]]] == ' ':
                        debug(d,'Countering Corner')
                        return {'offensive':True, 'entry': verticalFlip[horizontalFlip[corner]]}
                return {'offensive':False, 'entry':''}
            else:
                return {'offensive':False, 'entry':''}
            
        elif self.tactic == 'corner':
            if len(board.blankSpaces()) == 9:
                debug(d,'Begin Corner')
                return {'offensive':True, 'entry':random.choice(corners)}
            else:
                if board.board['CM'] != 'O':
                    if self.lastMove != '':
                        if board.board[horizontalFlip[self.lastMove]] == ' ' and board.board[self.lastMove[0] + 'M'] != 'O':
                            debug(d,'Horizontal Flip')
                            return {'offensive':True, 'entry':horizontalFlip[self.lastMove]}
                        elif board.board[horizontalFlip[self.lastMove]] == 'O':
                            debug(d,'Invert')
                            return {'offensive':True, 'entry':verticalFlip[horizontalFlip[self.lastMove]]}
                        else:
                            debug(d,'Vertical Flip')
                            return {'offensive':True, 'entry':verticalFlip[self.lastMove]}
                if board.board['CM'] == 'O':
                    for space in board.board:
                        if board.board[space] == 'X' and space in corners:
                            debug(d,'Form XOX')
                            return {'offensive':True, 'entry':horizontalFlip[verticalFlip[space]]}

                else:
                    return {'offensive':False, 'entry':''}
Provide offensive move based on a certain tactic.
recipes/Python/580723_TicTacToe_text_based/recipe-580723.py