JPref
This is a program playing Russian Preferans, two bots against a human player.
Honest game, no peeping or cheating. It is standalone,
no need for network connection, except when the user decides to send me
some feedback, as described below.
This version is far from completion. In spite of my all efforts,
most probably it still has lots of bugs, so the critical feedback is greatly appreciated.
The most important limitation is that this version cannot play 'standing',
so this option is avoided/disabled. As a result, there is no mandatory whist on six of spades
(Stalingrad). The program will always whist (even when it does not make sense),
specifically to allow more testing.
Installation
The program can run on all OS that support standard Java, like Windows, macOS, Linux.
JRE 1.8 or later is needed to run JPref.
If you do not have JRE installed, you can find all the necessary instructions here:
www.java.com/en/download/help/download_options.html.
If you do not plan to build this project and just want to play with the program, JRE will be enough,
JDK is not necessary.
In this case you can get the pre-build program
here.
Launch
Open Terminal window (cmd.exe on Windows) and type:
java -jar <path to jpref.jar> [list of deals]
If the list of deals is specified, it will be used for playing instead of random deals.
This allows better program testing.
Log file that the program generates (see below) can be used as a list of deals,
so the recorded games can be replayed.
Running the program
The buttons in the bottom-right corner are:
- Settings.
- Log your comments.
- Help - this file/screen.
Card selection during the play is simplified, it requires
a single left-button mouse click (later it will be configurable).
Right-button mouse click invokes the program menu:
- Scores - show score table.
- Last Trick - show the last trick.
- Your Offer - negotiate the round results.
- Replay - replay the current deal.
- Submit Log - see below.
- New Game - the current game will be aborted.
In addition to the settings that can be updated explicitly,
the program window location and size are preserved if the user exits
via 'x' button at the top of the window,
so JPref will open on the same spot next time.
At the end of the round you'll see the scores. If you dismiss this pop-up window
with Replay button, the program will replay the last round in the manual mode
when all moves have to be done manually and all the cards are visible.
This feature allows the user to verify his/her and the program moves,
and possibly find the errors in the JPref algorithm.
The important program feature is logging. The program records there all the games. Logs are located in
'logs' directory, either next to jpref.jar
file (macOS, Linux), or in <your home folder>\jpref (Windows).
New log is opened with a new program launch or with the new day.
Button Comments (second right in the bottom right corner) invokes the comment window.
It is important to record the program errors, stupid moves, etc.
The whole comment text will be written into the log that the user can submit to the developer:
- Through the menu. Limitations - only the current log.
- Via github - open an issue.
- Send the log file to ab.jpref@gmail.com
Thank you for reading this whole text till the end.
Alexander Bootman.