The countPieces() method in MyBoard.java can sum pieces placed and not placed by merely being given the Space type object which is all which is needed since the Board (specifically, MyBoard) knows about itself, the board, and what pieces are left, in what quantity, and in which status. It doesn't need any more information (to be passed in) since the Board has all the rest of the information.
I raise another point in another thread in this forum (discussion board forum, whatever it's called) about editing isCapture() which cannot be done, but I won't duplicate that post here. Any TA, please read that post and answer. |