Skip to content

Commit

Permalink
Update tic_tac_toe.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding4Hours authored Jul 9, 2024
1 parent 5c92c5b commit 06a5991
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tic_tac_toe.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,14 @@ def update_readme(board, status):
def main(move):
with open('README.md', 'r') as file:
content = file.read()

board = re.findall(r'\| (.) \| (.) \| (.) \|', content)
board = [item for sublist in board for item in sublist]

current_player = board['turn']


with open('stuff.json', 'r') as file:
data = json.load(file)
board = data['board']


current_player = data['turn']

print(board)

if update_board(board, move, current_player):
Expand Down

0 comments on commit 06a5991

Please sign in to comment.