checker()
function inside of the turn()
function, I decided to put the checker function as part of the for-loop instead, and made it so that the checker function only runs when the for-loop reaches 5 or more loops. To do this, I also had to move the variables row
and column
from the turn function, and made it go from:def turn(i, playing): Column=0 Row=0 (More code here) for i in range(1,10): turn(i, playing)
To:
for i in range(1,10): column = 0 row = 0 turn(i, playing, column, row) if i >= 5: checked = checker(i, playing, column, row, board)
Next what I did was I combine the two files,
main.py
and definitions.py
. I did this partially because I was having some issues with imported functions not working right, and because I thought it would be easier to debug than two separate files. This came with some renaming and restructuring of the combined file. I also accidentally saved the file to two different directories, but I used the unix command, diff
, to figure out which was newer.
No comments:
Post a Comment