Download Latest Version ConsolePref-1.8.2.zip (53.5 kB)
Email in envelope

Get an email when there's a new version of ConsolePref

Home / sources
Name Modified Size InfoDownloads / Week
Parent folder
ConsolePref-1.8.2.zip 2025-05-31 53.5 kB
README.txt 2025-05-31 2.7 kB
ConsolePref-1.7.7.8.zip 2024-10-13 48.8 kB
ConsolePref-1.7.7.5.zip 2024-09-15 46.8 kB
ConsolePref-1.7.7.4.zip 2024-09-07 46.1 kB
ConsolePref-1.7.7.3.zip 2024-09-06 2.0 MB
ConsolePref-1.7.2-beta.tar.bz2 2019-05-03 32.2 kB
cards.png 2019-05-03 3.1 MB
ConsolePref-0.1.5.tar.bz2 2016-02-02 24.0 kB
ConsolePref-0.1.4.tar.bz2 2015-05-23 22.9 kB
ConsolePref-0.1.3.tar.bz2 2015-05-14 21.8 kB
ConsolePref-0.1.2-beta.tar.bz2 2015-05-08 21.6 kB
ConsolePref-0.1.1-alpha.tar.bz2 2015-05-01 20.6 kB
Totals: 13 Items   5.4 MB 0
Welcome to ConsolePref, a preference game program

Version 1.8.2

-----------------
Requirements
-----------------

The program by default uses the linux infrastucture for random numbers generation,
be sure that a special device file /dev/urandom is available and has
reading permissions for the current user. If not, it tries to use Intel RDRAND
instruction. If all above fails it uses the standard libc rand() routine seeded
with realtime clock value. This behaviour can be changed by -r<x> keys, see below.

----------------
Compiling
----------------

On MacOS you must have Homebrew installed. This game uses GTK+3,
to install it, run:

$ brew install gtk+3

Unpack the source archivel into your base source directory (such as
/usr/src/ or /usr/local/src), cd into resulting folder and type 
 
$ make

Now if the compilation was successful you've got an executable file 
named "prefp". You can install it to the default executables path
such as /usr/local/bin

----------------
Playing
----------------

TEXT INTERFACE:

Go to the folder containing the "prefp" binary and type

$ ./prefp -nw

Now you are good to go. Currently following options are present:

 -op - opens cards to the player, so you can see the computer opponents' 
       cards
 -oc - opens cards to the computer, so the cpu sees your cards
 -s <filename> - set the file name for saving the score. The default
       is stats.sav
 -h N - set the game hand to N (0,1,2) where 0 is the player
 -sh - prints the current score and exits
 -ri - use internal random numbers generator
 -rd - use RDRAND generator on newer Intel and AMD processors
 -urf <filename> - set the file name for the source of random numbers
      (can be a regular file with enough entropy). The default is
      /dev/urandom for UNIX random numbers generation. On some systems
       with hardware rng you can use /dev/random for cryptographic grade
       random numbers but game slowdowns can be expected
 -nt <number of threads> - set the maximum number of threads 
 -nw - disable GUI
 --help - show usage help

Moves are done and shown usig a two symbols notation. The first one denotes 
the card value:

 AKQJ1987

and the second is for the suit:

 SCDH - Spades, Clubs, Diamonds, Hearts

so QH means a queen of hears and 1S means a 10 of spades, and so like.

GRAPHICAL INTERFACE:

Copy a resource file cards.png to $HOME/.consolepref folder and run
$ ./prefp 
This should give you a graphical interface.

The scores are written to the text file stats.sav in the mentioned above
game folder.

NOTES:

1.7.7.3 version of the program can only be used on MacOS
1.7.7.4 and later compile and run on both Linux and MacOS

Source: README.txt, updated 2025-05-31