[Game] Refactor: move setCardAttrHelper to PlayerEventHandler (#6772)

This commit is contained in:
RickyRister 2026-05-09 13:10:56 -07:00 committed by GitHub
parent 48e21aad38
commit cdb171f201
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 66 additions and 88 deletions

View file

@ -43,20 +43,6 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, A
connect(this, &Player::activeChanged, graphicsItem, &PlayerGraphicsItem::onPlayerActiveChanged);
connect(this, &Player::openDeckEditor, game->getTab(), &TabGame::openDeckEditor);
forwardActionSignalsToEventHandler();
}
// Event Handler is the controller i.e. everything hooks up to this to know about player state
// Player should forward (private) signals to the event handler
void Player::forwardActionSignalsToEventHandler()
{
connect(playerActions, &PlayerActions::logSetTapped, playerEventHandler, &PlayerEventHandler::logSetTapped);
connect(playerActions, &PlayerActions::logSetDoesntUntap, playerEventHandler,
&PlayerEventHandler::logSetDoesntUntap);
connect(playerActions, &PlayerActions::logSetAnnotation, playerEventHandler, &PlayerEventHandler::logSetAnnotation);
connect(playerActions, &PlayerActions::logSetPT, playerEventHandler, &PlayerEventHandler::logSetPT);
}
void Player::initializeZones()