Current section I'm working on requires me to take coloured pieces from the bar and place them onto a board.
I've had to define the board through makeBoard and the values are stored in "myBoard"
What I'm struggling with is that on my next section "enterPiece" I've got it so I successfully take the relevant coloured pieces from the bar, detract it from the number and then allocate the piece to the board..
what I'm aiming to do is.. 0 < aPoint <= n (where n is the size of the board where I've defined in makeBoard), but I don't know how to get python to get the n from the variable myBoard
def enterPiece(aBoard, aColour, aPoint):
c = aBoard
if 0 < aPoint:
for j in range(aPoint):
c.removePieceFromPoint(aColour, 0)
c.addPieceToPoint(aColour, aPoint)
return True
else:
return False