ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > N.A.N.Y. 2018

NANY 2018 Release: cnpaperplay - Codenames /Codenames Duet Play on Paper Clone

<< < (13/13)

ThR1LL:
How do I randomize the wordlist via command line? It keeps creating the same 10 books with the same word order each time. Does anyone else have this problem?

mouser:
Hi ThR1LL.

This is by design so that games are predictable between users.

You can use the --seedstart option to pass in a different seed number which will generate different random values; every time you use a different seed number you will get different games.

It may seem confusing but the idea was that YOUR games #1-10 would be the same as MY games #1-10, for easy comparison and playing together.

So the way I do it is I don't change the see, but I just make a pdf with like 500 games, and then just print a few of those at a time.  I thought I had an option where you could tell the program what game # to start printing at, but it seems I was wrong; I should probably add that feature.



You'll find commandline options in the readme.txt in the documentation folder:


--- ---//---------------------------------------------------------------------------
usage: cnduet.py [-h] [--language OPTION_LANGUAGE]
                 [--wordfile OPTION_WORDFILE]
                 [--patternfile OPTION_PATTERNFILE] [--outpath OPTION_OUTPATH]
                 [--turncount OPTION_TURNCOUNT]
                 [--mistakecount OPTION_MISTAKECOUNT]
                 [--goalcount OPTION_GOALCOUNT] [--seedstart OPTION_SEEDSTART]
                 [--gamecount OPTION_GAMECOUNT] [--bookname OPTION_BOOKNAME]
                 [--format {html,pdf}]

optional arguments:
  -h, --help            show this help message and exit
  --language OPTION_LANGUAGE
                        language name (specifies a subdirectory of the data
                        directory where wordfile and templates will be looked
                        for)
  --wordfile OPTION_WORDFILE
                        filename (word list text file to user; should not
                        include subdirectory; will be looked for in
                        data/language and then data/ directories) (each word
                        should be on its own line)
  --patternfile OPTION_PATTERNFILE
                        filename (optionally with path) of card coloring
                        pattern data (each line is a triple specifying
                        cardcount, player1color, player2color); just base name
                        no subdir
  --outpath OPTION_OUTPATH
                        path to save output files
  --turncount OPTION_TURNCOUNT
                        number of turns per game
  --mistakecount OPTION_MISTAKECOUNT
                        number of mistakes allowed per game
  --goalcount OPTION_GOALCOUNT
                        number of goals needed to win game)
  --seedstart OPTION_SEEDSTART
                        starting seed number to use
  --gamecount OPTION_GAMECOUNT
                        number of games to generate
  --bookname OPTION_BOOKNAME
                        base name of book output files
  --format {html,pdf}   final output format (should be html or pdf)

E:\MyDocs\Programming\Python\cnpaperplay\source>

//---------------------------------------------------------------------------

Navigation

[0] Message Index

[*] Previous page

Go to full version