mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
minor cleanups and log improvements
This commit is contained in:
parent
52b8a5b0e7
commit
2148005bd1
18 changed files with 215 additions and 306 deletions
|
|
@ -4,10 +4,8 @@
|
|||
#include "client.h"
|
||||
|
||||
TableZone::TableZone(Player *_p, QGraphicsItem *parent)
|
||||
: CardZone(_p, "table", true, false, parent), width(864), height(578)
|
||||
: CardZone(_p, "table", true, false, true, parent), width(864), height(578)
|
||||
{
|
||||
cards = new CardList(true);
|
||||
|
||||
gridPoints << (QList<QPoint>() << QPoint(8, 12)
|
||||
<< QPoint(9, 13)
|
||||
<< QPoint(10, 14)
|
||||
|
|
@ -68,7 +66,7 @@ void TableZone::addCardImpl(CardItem *card, int _x, int _y)
|
|||
qreal x = mapPoint.x();
|
||||
qreal y = mapPoint.y();
|
||||
|
||||
cards->append(card);
|
||||
cards.append(card);
|
||||
// if ((x != -1) && (y != -1)) {
|
||||
if (!player->getLocal())
|
||||
y = height - CARD_HEIGHT - y;
|
||||
|
|
@ -108,9 +106,9 @@ void TableZone::toggleTapped()
|
|||
|
||||
CardItem *TableZone::getCardFromGrid(const QPoint &gridPoint) const
|
||||
{
|
||||
for (int i = 0; i < cards->size(); i++)
|
||||
if (cards->at(i)->getGridPoint() == gridPoint)
|
||||
return cards->at(i);
|
||||
for (int i = 0; i < cards.size(); i++)
|
||||
if (cards.at(i)->getGridPoint() == gridPoint)
|
||||
return cards.at(i);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue