I'm currently making a TicTacToe game to improve on my Python skills. I have everything done, but my enemy code won't work, since it will either not do anything, place it's mark on my mark, or place multiple marks. I'm pretty sure it's because of my loop, since the whole point of it was to fix the issues. But when I set the loop condition to False in my loop, it keeps on going (I know this because I have print()'s to help me debug)
Heres the code:
while run_loop == True:
for tile in tiles:
print(enemy_rng())
if enemy_rng() == tile["num"]:
if tile["enemy"] is True: # If matching
enemy_rng()
print("Matched")
else: # If successful
print("Successful")
run_loop = False
else: # If the rng doesn't match the number
print("Nothing")
run_loop = False