summaryrefslogtreecommitdiff
path: root/noncore/games/buzzword
authorimm <imm>2002-08-30 22:03:20 (UTC)
committer imm <imm>2002-08-30 22:03:20 (UTC)
commitc3fbc3f07c4deb54a3c5efd7cd91beaba875d57c (patch) (unidiff)
treec08b80f938953dff0a25798bae77b623b9024932 /noncore/games/buzzword
parent8c26b7fe6b3afc8c3de2ee48bfb50bb041dadede (diff)
downloadopie-c3fbc3f07c4deb54a3c5efd7cd91beaba875d57c.zip
opie-c3fbc3f07c4deb54a3c5efd7cd91beaba875d57c.tar.gz
opie-c3fbc3f07c4deb54a3c5efd7cd91beaba875d57c.tar.bz2
fix by sandman
STL -> qt
Diffstat (limited to 'noncore/games/buzzword') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/buzzword/buzzword.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/noncore/games/buzzword/buzzword.cpp b/noncore/games/buzzword/buzzword.cpp
index 447396b..324b5bd 100644
--- a/noncore/games/buzzword/buzzword.cpp
+++ b/noncore/games/buzzword/buzzword.cpp
@@ -34,5 +34,2 @@
34 34
35#include <list>
36#include <string>
37
38#include <qpe/qpeapplication.h> 35#include <qpe/qpeapplication.h>
@@ -41,8 +38,2 @@
41 38
42// sponsered by rikkus :)
43bool random_compare(const QString &, const QString &)
44{
45 return (rand() % 2) > 0.5;
46}
47
48BuzzLabel::BuzzLabel( QWidget *parent, const char *name ) 39BuzzLabel::BuzzLabel( QWidget *parent, const char *name )
@@ -98,3 +89,3 @@ void BuzzWord::drawGrid()
98{ 89{
99 std::list<QString> l; 90 QStringList l;
100 91
@@ -109,3 +100,3 @@ void BuzzWord::drawGrid()
109 { 100 {
110 l.push_back(t.readLine()); 101 l << t.readLine();
111 } 102 }
@@ -114,4 +105,2 @@ void BuzzWord::drawGrid()
114 105
115 l.sort(random_compare);
116
117 grid = new QGrid(gridVal, this); 106 grid = new QGrid(gridVal, this);
@@ -123,3 +112,5 @@ void BuzzWord::drawGrid()
123 { 112 {
124 QString word = QStringList::split(" ", l.front()).join("\n"); 113 uint pos = rand() % l. count();
114
115 QString word = QStringList::split(" ", l[pos]).join("\n");
125 BuzzItem* bi = new BuzzItem( c, r, word, grid ); 116 BuzzItem* bi = new BuzzItem( c, r, word, grid );
@@ -128,3 +119,3 @@ void BuzzWord::drawGrid()
128 119
129 l.pop_front(); 120 l.remove( l.at( pos ));
130 } 121 }