Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Tic-Tac-Toe/TicTacToe.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def userMove():
def compMove():
possibleMoves = [x for x,letter in enumerate(board) if letter == " " and x != 0]
move = 0

for let in ['O','X']:
for i in possibleMoves:
boardCopy = board[:]
Expand Down Expand Up @@ -116,10 +115,10 @@ def main():
print("Tie game")

else:
insertLetter("O", move)
print(f"Computer place O on position {move}")
if isBoardFull(board)==False:
insertLetter("O", move)
print(f"Computer place O on position {move}")
printBoard(board)

else:
print("You win! ")
break
Expand Down