How do I make a list with only one pointer per cell? (I think that is the problem)
Thanks ps if you are feeling nice, how do I take the spaces out of the print function?
class Board(object):
"""board of pieces"""
def __init__(self):
self.board = [['0']*7]*6 #6x7 grid
self.board[3][6] = 8
def printBoard(self):
"""Display the board array"""
print self.board
for i in range(6):
for j in range(7):
print self.board[i][j],
print "\n",
0 0 0 0 0 0 8
0 0 0 0 0 0 8
0 0 0 0 0 0 8
0 0 0 0 0 0 8
0 0 0 0 0 0 8
0 0 0 0 0 0 8