[Refactor] Retype PlayerActions onto CardState

This commit is contained in:
Lukas Brübach 2026-10-07 09:35:12 +02:00 • committed by GitHub
parent e2cbbecefe
commit e0d2f158e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 137 additions and 126 deletions

View file

@ -444,7 +444,7 @@ void ArrowDragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
startCard->playCard(false);
}
player->getPlayerActions()->createArrow(startCard, arrow, deleteInPhase);
player->getPlayerActions()->createArrow(startCard->getState(), arrow, deleteInPhase);
}
delArrow();
@ -536,7 +536,7 @@ void ArrowAttachItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
auto *startCard = qgraphicsitem_cast<CardItem *>(startItem);
auto *targetCard = qgraphicsitem_cast<CardItem *>(targetItem);
if (startCard && targetCard) {
player->getPlayerActions()->attachCards(startCard, targetCard);
player->getPlayerActions()->attachCards(startCard->getState(), targetCard->getState());
}
}