4 #include <QGraphicsScene>
6 class SeaScene : public QGraphicsScene
10 explicit SeaScene(QObject *parent = 0);
16 /*! Places all needed items for a level to (re)start.
17 Relies on the scene size to be explicitly set to a a value that will persist troughout play.
18 @param ghosts the number of ghosts to be placed on the map
19 @param rocks the number of rocks to be placed on the map
20 @param octopuses number of octopuses to be placed on the map
22 void setupMap(int ghosts, int rocks, int octopuses);
24 void spreadGhosts(int ghosts);
28 /*! Gives a pointer to a random position if a free one is found. Otherwise returns NULL.
29 The position is the upper left corner of a free 40x40 pixels slot.
32 QPointF* findRandomFreeSlot();
34 const QString ghostImageFilename_;
35 const QString rockImageFilename_;
36 const QString octopusImageFilename_;
37 const QStringList shipImageFilenames_;
39 QList<QPointF> freeTiles_;