QByteArray tmp = words.readLine().trimmed();
QString word = QString::fromUtf8(tmp);
if (word.isEmpty()) { // game over
- qDebug() << "TODO: implement gameover";
- exit (0);
+ mainLabel->setText("GAME OVER");
+ for (QMap<int, Player*>::Iterator it = players.begin(); it != players.end(); ++it) {
+ QString tmp = QString ("Spieler %1 hat %2 Punkte.").arg(it.value()->getName()).arg(it.value()->score);
+ it.value()->setWaiting(tmp);
+ }
} else {
resetPlayerText();
mainLabel->setText(word);