If I have a function with some values that I defined in the function, how would i go about getting those values out to be check against.
I know I can return values, just not sure with this setup.
Any guidance much appreciated.
I figured it out. I made a list with the values and returned them. I must be getting tired.
I know I can return values, just not sure with this setup.
Any guidance much appreciated.
Some other stuff above check = ['x','x','x'] for value in self.possible(): if check in value: do stuff def possible(self): # Rows self.row1 = [self.grid[0], self.grid[1], self.grid[2]] self.row2 = [self.grid[3], self.grid[4], self.grid[5]] self.row3 = [self.grid[6], self.grid[7], self.grid[8]] # Columns self.col1 = [self.grid[0], self.grid[3], self.grid[6]] self.col2 = [self.grid[1], self.grid[4], self.grid[7]] self.col3 = [self.grid[2], self.grid[5], self.grid[8]] # Diagonals self.diag1 = [self.grid[0], self.grid[4], self.grid[8]] self.diag2 = [self.grid[2], self.grid[4], self.grid[6]]
I figured it out. I made a list with the values and returned them. I must be getting tired.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts