<commit_before>class TicTacToe():
    def __init__(self):
        self.board = [[" "]* 3 for i in range(3)]
        self.cross = 'X'
        self.circle = 'O'
        self.turn = 0
        self.playerXwins = 0
        self.playerOwins = 0
        self.playerTurn = ""

    def placeSign(self, sign, x, y):
        try:
            if sign != self.cross and sign != self.circle:
                raise BaseException("Inavlid sign placed")
        except BaseException:
            print("Invalid sign")

        self.board[y][x] = sign

    def countTurn(self):
        self.turn =+ 1
        if not self.playerTurn or self.playerTurn == self.circle:
            self.playerTurn = self.cross
        else:
            self.playerTurn = self.circle

    def checkGame(self):
        if (self.board[0][0] == self.board[1][0] == self.board[2][0] or
            self.board[0][1] == self.board[1][1] == self.board[2][1] or
            self.board[0][2] == self.board[1][2] == self.board[2][2] or
            self.board[0][0] == self.board[0][1] == self.board[0][2] or
            self.board[1][0] == self.board[1][1] == self.board[1][2] or
            self.board[2][0] == self.board[2][1] == self.board[2][2] or
            self.board[0][0] == self.board[1][1] == self.board[2][2] or
            self.board[0][2] == self.board[1][1] == self.board[2][0]):
                self.endGame()

    def endGame(self):
        if self.playerTurn == self.cross:
            self.playerXwins += 1
        else:
            self.playerOwins += 1
        self.turn = 0
        self.board = [[" "] * 3 for i in range(3)]

    def printASCIIgame(self):
        score = "Player X    "+self.playerXwins+" - "+self.playerOwins+"    Player O"
        boardFirstRow = "["+self.board[0][0]+"] ["+self.board[0][1]+"] ["+self.board[0][2]+"]"
        boardSecondRow = "["+self.board[1][0]+"] ["+self.board[1][1]+"] ["+self.board[1][2]+"]"
        boardThirdRow = "["+self.board[2][0]+"] ["+self.board[2][1]+"] ["+self.board[2][2]+"]"

        print(score+"\n\n\n"+boardFirstRow+"\n"+boardSecondRow+"\n"+boardThirdRow)

game = TicTacToe()
game.printASCIIgame()<commit_msg>semi working game<commit_after>class TicTacToe():
    def __init__(self):
        self.board = [[" "]* 3 for i in range(3)]
        self.cross = 'X'
        self.circle = 'O'
        self.turn = 0
        self.playerXwins = 0
        self.playerOwins = 0
        self.playerTurn = ""

    def _placeSign(self, sign, x, y):
        try:
            if sign.upper() != self.cross and sign.upper() != self.circle:
                raise BaseException("Inavlid sign placed")
        except BaseException:
            print("Invalid sign")

        self.board[y][x] = sign

    def placeSign(self, x, y):
        x = int(x) - 1
        y = int(y) - 1
        if self.board[y][x] != " ":
            return 1

        self.board[y][x] = self.playerTurn
        return 0

    def countTurn(self):
        self.turn =+ 1
        if not self.playerTurn or self.playerTurn == self.circle:
            self.playerTurn = self.cross
        else:
            self.playerTurn = self.circle

    def checkGame(self):
        if (self.board[0][0] == self.board[1][0] == self.board[2][0] or
            self.board[0][1] == self.board[1][1] == self.board[2][1] or
            self.board[0][2] == self.board[1][2] == self.board[2][2] or
            self.board[0][0] == self.board[0][1] == self.board[0][2] or
            self.board[1][0] == self.board[1][1] == self.board[1][2] or
            self.board[2][0] == self.board[2][1] == self.board[2][2] or
            self.board[0][0] == self.board[1][1] == self.board[2][2] or
            self.board[0][2] == self.board[1][1] == self.board[2][0]):
                self.endGame()

    def endGame(self):
        if self.playerTurn == self.cross:
            self.playerXwins += 1
        else:
            self.playerOwins += 1
        self.turn = 0
        self.board = [[" "] * 3 for i in range(3)]

    def printASCIIgame(self):
        score = "Player X    {} - {}    Player O"
        boardRow = "         [{}] [{}] [{}]"

        print(score.format(self.playerXwins, self.playerOwins))
        print(boardRow.format(self.board[0][0], self.board[0][1], self.board[0][2]))
        print(boardRow.format(self.board[1][0], self.board[1][1], self.board[1][2]))
        print(boardRow.format(self.board[2][0], self.board[2][1], self.board[2][2]))

game = TicTacToe()
while True:
    game.printASCIIgame()
    while game.countTurn():
        pass
    game.placeSign(input(), input())
{'fraction_non_alphanumeric': 0.1879947229551451, 'fraction_numerical': 0.034740545294635, 'mean_word_length': 2.122168840082361, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5954328', 'n_tokens_mistral': 1631, 'n_tokens_neox': 1572, 'n_words': 295}