Refined the core interfaces of the game

This commit is contained in:
2025-11-30 11:08:01 +08:00
parent 48728c1a5b
commit 532883835b
8 changed files with 138 additions and 32 deletions

View File

@@ -21,7 +21,7 @@ bool Rule::canPlacePiece(const Piece* piecePos) {
}
bool Rule::canbeSelect(const Piece* PieceID, PlayerID ID) {
if (PieceID->getPieceOwner() != ID) {
if (PieceID == nullptr || PieceID->getPieceOwner() != ID) {
return false;
}
return true;