void levelFailed();
private slots:
+ void onDoneClicked();
void onCellClicked(int row, int column);
void onValidPieceSelected(const Piece* piece);
void onInvalidPieceSelected();
void onTimeout();
- void levelEnds();
void computeFlow();
private:
+ void levelEnds();
+
AvailablePieces* pieceUi; // Not owned
GameField* fieldUi; // Not owned
QLabel* timeLabel; // Not owned
Direction flowDir;
int flowPreplaced;
int flowScore;
+ bool animate;
};
class LevelSwitcher : public QObject
LevelSwitcher(GameController* gameController,
QWidget* levelWidget, QListWidget* levelList, QPushButton* levelStartButton,
QWidget* startWidget, QLabel* startTitle, QLabel* startLabel, QPushButton* startButton,
- QLabel* levelLabel, QLabel* scoreLabel,
+ QWidget* gameWidget, QLabel* levelLabel, QLabel* scoreLabel,
QStringList levels);
private slots:
private:
void initiateLevel();
+ void readSavedGames();
+ void writeSavedGames();
+ void readLevelCollections(QStringList collections);
GameController* gameController; // Not owned
QWidget* levelWidget; // Not owned
QLabel* startTitle; // Not owned
QLabel* startLabel; // Not owned
QPushButton* startButton; // Not owned
+ QWidget* gameWidget; // Not owned
QLabel* levelLabel; // Not owned
QLabel* scoreLabel; // Not owned
- QStringList levelCollections;
+ QString curColl;
QStringList levels;
int level;
int totalScore;
+ QHash<QString, int> savedGames; // level collection -> next level ix
+ QHash<QString, QStringList> levelCollections; // level collection -> level names
};
#endif