minor cleanups and log improvements

This commit is contained in:
Max-Wilhelm Bruker 2009-08-05 16:50:16 +02:00
parent 52b8a5b0e7
commit 2148005bd1
18 changed files with 215 additions and 306 deletions

View file

@ -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;
}