projects
/
multypo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0712b0f
)
works
author
Constantin
<constantin@exxxtremesys.lu>
Fri, 19 Jul 2013 15:54:52 +0000
(17:54 +0200)
committer
Constantin
<constantin@exxxtremesys.lu>
Fri, 19 Jul 2013 15:54:52 +0000
(17:54 +0200)
qt/multypo.cpp
patch
|
blob
|
history
diff --git
a/qt/multypo.cpp
b/qt/multypo.cpp
index 1667c0fcd87e1107e54018714bee1b0490f53ca9..8dea3e025abeea2b8ca1aa2aaa25dbd7d64d741e 100644
(file)
--- a/
qt/multypo.cpp
+++ b/
qt/multypo.cpp
@@
-44,8
+44,11
@@
void MultypoWindow::nextWord() {
QByteArray tmp = words.readLine().trimmed();
QString word = QString::fromUtf8(tmp);
if (word.isEmpty()) { // game over
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);
} else {
resetPlayerText();
mainLabel->setText(word);