Skip to content

Instantly share code, notes, and snippets.

@Crowbrammer
Created February 16, 2017 04:06
Show Gist options
  • Save Crowbrammer/4924f259a3807ec8d4f2ab9fd1fce98b to your computer and use it in GitHub Desktop.
Save Crowbrammer/4924f259a3807ec8d4f2ab9fd1fce98b to your computer and use it in GitHub Desktop.
This is sort of like what I*'m trying to do.
# # Tic Tac Toe
square = ['*']
board = []
class row():
row = square * 3
test = row()
print(test.row)
def display_board():
for i in range(3):
board.append(row()) # The DropDown takes the place of row()
board[1].row[0] = 'X' # The DropDown, when selected, needs to change a specific row.
return board
for each in display_board():
print(each.row) # The DropDown needs to affect the exact row it's over--based on the index.
# This code doesn't work, which is a good example of what's going on with my code. I tried to get an X on the 2nd row, 1st column.
# But, the entire first column contains 'X's'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment