fix Board::getRandomPiece range bound checking error