JumblePuzzle::JumblePuzzle(string word, string difficulty) { input = word; level = difficulty; //ensure always random unsigned seed = time(0); srand(seed); //constructor taking in the word and difficulty instantiatePuzzle(word, difficulty); //fill the array with the word fillLetter(word); }
MoveDialog::MoveDialog(QWidget *parent, const QString& curYear, const QString &curLetter) : QDialog(parent), ui(new Ui::MoveDialog), cy(curYear), cl(curLetter), _db(QSqlDatabase::database("schmgr")) { ui->setupUi(this); setWindowFlags(Qt::Dialog); fillBox(); for (int i = 0; i<= ui->cbYear->count() -1; i++) { ui->cbYear->setCurrentIndex(i); if (ui->cbYear->currentText() == cy) break; } fillLetter(ui->cbYear->currentText()); }
void MoveDialog::on_cbYear_currentIndexChanged(const QString &arg1) { fillLetter(arg1); }