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:
9c1e7f7
)
allow passing words file as argument
author
Ralf Jung
<post@ralfj.de>
Mon, 14 Oct 2013 15:35:46 +0000
(17:35 +0200)
committer
Ralf Jung
<post@ralfj.de>
Mon, 14 Oct 2013 15:35:46 +0000
(17:35 +0200)
play.sh
patch
|
blob
|
history
qt/multypo.cpp
patch
|
blob
|
history
diff --git
a/play.sh
b/play.sh
index 288dbcf71d9f3077cb582993bafdab4ff6e53823..d9367efd93cea93a2596be5cd12c576290a28600 100755
(executable)
--- a/
play.sh
+++ b/
play.sh
@@
-1,8
+1,13
@@
-#!/bin/sh
+#!/bin/
ba
sh
# you should probably download a txt dictionary of your favourite language and use that as a words.txt
WORDSTOPLAY=10
# you should probably download a txt dictionary of your favourite language and use that as a words.txt
WORDSTOPLAY=10
+WORDSFILE="$1"
+if [[ -z "$WORDSFILE" ]]; then
+ WORDSFILE="words.txt"
+fi
-sort -R dict.txt | sed 's/\/.*//' | egrep '^[A-Za-z]{5,}$' | head -n $WORDSTOPLAY | tr [:upper:] [:lower:] | qt/multypo
+export LC_ALL=C # dont do unicode stuff in egrep
+sort -R "$WORDSFILE" | sed 's/\/.*//' | egrep '^[A-Za-z]{5,}$' | head -n $WORDSTOPLAY | tr [:upper:] [:lower:] | qt/multypo
diff --git
a/qt/multypo.cpp
b/qt/multypo.cpp
index c9e710187163be7fe2e3db99f836ed1f988bf911..5ccfed8fa23205bcc651ad9772a90863d4703fc6 100644
(file)
--- a/
qt/multypo.cpp
+++ b/
qt/multypo.cpp
@@
-16,7
+16,7
@@
MultypoWindow::MultypoWindow(QWidget *parent) :
gameStarted(false)
{
/* Prepare colors */
gameStarted(false)
{
/* Prepare colors */
- setStyleSheet("background-color: black; color: green; font-size:
5
5pt");
+ setStyleSheet("background-color: black; color: green; font-size:
4
5pt");
/* Prepare conents */
setLayout(new QVBoxLayout(this));
/* Prepare conents */
setLayout(new QVBoxLayout(this));