Straightforward Game Rules
-> Count X and O in the Whole Board.\n-> Write a Function to check Status of Winner(if present)\n-> Use Status to Check Finally the state of the Board.\n\n\ncla
-> Count X and O in the Whole Board.\n-> Write a Function to check Status of Winner(if present)\n-> Use Status to Check Finally the state of the Board.\n\n```\nclass Solution:\n    def validTicTacToe(self, board: List[str]) -> bool:\n        row, col = len(board), len(board[0])\n        xCount, oCount = 0, 0\n        \n        def checkStatusWinner(board):\n            status = \'\'\n            if board[0][2] == board[1][1] == board[2][0] !=\' \':\n                status = board[0][2]\n            elif board[0][0] == board[1][1] == board[2][2] !=\' \':\n                status = board[0][0]\n            elif board[0][0] == board[0][1] == board[0][2] !=\' \':\n                status = board[0][0]\n            elif board[0][2] == board[1][2] == board[2][2] !=\' \':\n                status = board[0][2]\n            elif board[2][2] == board[2][1] == board[2][0] !=\' \':\n                status = board[2][2]\n            elif board[2][0] == board[1][0] == board[0][0] !=\' \':\n                status = board[2][0]\n            elif board[0][1] == board[1][1] == board[2][1] !=\' \':\n                status = board[0][1]\n            \n            return status\n\n        for i in range(row):\n            for j in range(col):\n                if board[i][j] == \'X\':\n                    xCount += 1\n                elif board[i][j] == \'O\':\n                    oCount += 1\n\n        if xCount < oCount or oCount+1 < xCount:\n            return False\n        \n        status = checkStatusWinner(board)\n\n        if status == \'X\':\n            return xCount == oCount+1\n        if status == \'O\':\n            return xCount == oCount\n        \n        return True\n```
['Python', 'Python3']