From: Ralf Jung Date: Mon, 14 Oct 2013 15:35:46 +0000 (+0200) Subject: allow passing words file as argument X-Git-Url: https://git.ralfj.de/multypo.git/commitdiff_plain/48457df920b6f2c3747baa57366cc23389b3caca?ds=sidebyside;hp=9c1e7f79952d5e4f6c8c38bb71e1c7c4dc6a3d01 allow passing words file as argument --- diff --git a/play.sh b/play.sh index 288dbcf..d9367ef 100755 --- a/play.sh +++ b/play.sh @@ -1,8 +1,13 @@ -#!/bin/sh +#!/bin/bash # 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 c9e7101..5ccfed8 100644 --- a/qt/multypo.cpp +++ b/qt/multypo.cpp @@ -16,7 +16,7 @@ MultypoWindow::MultypoWindow(QWidget *parent) : gameStarted(false) { /* Prepare colors */ - setStyleSheet("background-color: black; color: green; font-size: 55pt"); + setStyleSheet("background-color: black; color: green; font-size: 45pt"); /* Prepare conents */ setLayout(new QVBoxLayout(this));