4 Ship::Ship(QPixmap pixmap, QGraphicsItem *parent) :
5 OrientationControlledGraphicsPixmapObject(pixmap,parent)
11 bool Ship::handleCollisions()
13 QList<QGraphicsItem*> collidesList = collidingItems();
15 if (collidesList.isEmpty())
20 //since the game logic does not leave items to collide with each other we can take just the topmost one
21 //and trust it is the only one
22 QString type = collidesList.at(0)->data(0).toString();
25 if (type == "rock" || type == "octopus")
31 else if (type == "ghost")
35 qDebug() << ghostsAboard_ << " ghosts aboard";
37 emit pickingGhost(collidesList.at(0));