You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
714 B
C++
26 lines
714 B
C++
#ifndef SAMEGAME_H
|
|
#define SAMEGAME_H
|
|
|
|
#include <set>
|
|
#include <vector>
|
|
#include <QSettings>
|
|
#include <QString>
|
|
|
|
class SameGame
|
|
{
|
|
private:
|
|
std::vector<std::vector<QString>> gameMatrix;
|
|
const QStringList colors;
|
|
public:
|
|
void initialiseGameMatrix(int rows, int columns);
|
|
SameGame(int rows, int columns);
|
|
QString getCell(int row, int column);
|
|
void setCell(int row, int column, QString color);
|
|
void checkNeighbour(std::set<std::vector<int>> *connectedSet, QString color, int row, int column);
|
|
void getConnected(std::set<std::vector<int>> *connectedSet, QString color, int row, int column);
|
|
int getNumberOfColors();
|
|
void deleteCell(int row, int column);
|
|
};
|
|
|
|
#endif // SAMEGAME_H
|