Implementation for getPiecePositions.
More tests for getPiecePositions.