Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2021-04-23 | 5.5 kB | |
pycassonne-0.9.2-py3-none-any.whl | 2021-04-23 | 1.1 MB | |
pycassonne-0.9.2.tar.gz | 2021-04-23 | 1.0 MB | |
Totals: 3 Items | 2.1 MB | 1 |
Pycassonne
Prologue
Carcassonne is (originally) a tile-based German-style board game for two to five players, designed by Klaus-Jürgen Wrede and published in 2000 by Hans im Glück in German. This application is one of its several implementations bears the base game. There are 72 cards to be deposited to the game board and 7 meeples (or pennants) are available per player.
Description
You may play against one or more computer/human players using this game with different selectable computer players' skills. Computer player examines own her step only, so the analysation depth is only 1, trying to gain the maximum available extra points. Turning trace mode on it is possible to play against computer with ultra skill level, where the analysation depth is increased to 2. With this setting the AI is stronger but the gameplay is unbearable slow. It is just for test purpose.
Gameplay
The application does not contain the gameplay manual, which is rather complex, however it can be checked at here. You may also download an excellent manual in PDF format at here or in Hungarian language here.
Controls
Control is done mostly with mouse, but some keys are also supported during the gameplay (outside of the configuration dialog).
- board can be scrolled with either arrow keys or AWSD letters
- 'R' key is used for changing the resolution in windowed mode
- 'F' key is used for changing to/back full screen mode
- 'C' key is used for capturing screen into local file named pycassonne_{number}.png
- 'U' key is used for undo with revokes the last human player's move (tiny cheat)
- 'E' key is used for saving game to local compressed file named pycassonne.json.gz
- 'I' key is used for loading game from local compressed file named pycassonne.json.gz
Known bug
Full screen mode (pressing 'F' key) might not work with pygame 2.0.0 on Linux. Quick solution might be the following (where versions must be updated):
Installed pygame (which is a dependency of the application) creates
/usr/local/lib/python3.8/dist-packages/pygame-2.0.0-py3.8-linux-x86_64.egg/pygame.libs
directory. Create a link there to the system libsdl library file:
sudo ln -s /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 libSDL2-2-a810f3c1.0.so.0.12.0
Epilogue
Have fun!
Installation
Linux (Quick mode)
-
Uncompress the downloaded pycassonne-0.9.2.tar.gz into a new folder
-
Install Python 3.x (tested on 3.8.2) On Ubuntu, Mint execute
sudo apt install python3 On other Linux distro, where apt command is not supported, check it out how to install python3.
-
Run the following command in command prompt in pycassonne root directory:
sudo python3 setup.py install
-
Run the following command from any directory
python3 -m pycassonne
Linux (for developers on Ubuntu)
-
Uncompress the downloaded pycassonne-0.9.2.tar.gz into a new folder
-
Install Python 3.x (tested on 3.8.2)
sudo apt install python3
-
Install pygame for python (tested on 2.0.0):
sudo apt install python3-pygame
-
Intall pygame-pgu for dialogs (tested on 0.21):
pip3 install pygame-pgu If pip3 is not found, install it at first sudo apt install python3-pip
-
Intall pygame-menu for menus (tested on 3.3.0):
pip3 install pygame-menu
-
Install setuptools for python (tested on 45.2.0)
sudo apt install python3-setuptools
-
Optional: run the following command in pycassonne root directory to generate dist content:
python3 setup.py sdist
-
Run the following command in pycassonne root directory to start the game:
python3 -m pycassonne
Windows
-
Download and install Python 3.8.2 (or later) 64-bit (or choose the 32-bit version if the target computer is very outdated). https://www.python.org/ftp/python/3.8.2/python-3.8.2-amd64.exe Note: Pyhton can be installed from Microsoft Store as well.
-
Download pycassonne-0.9.2-py3-none-any.whl into an arbitrary folder
-
Run the following command (having started a command prompt before) in the folder where pycassone was downloaded: pip install pycassonne-0.9.2-py3-none-any.whl
-
Run the following command to start the game: python -m pycassonne
Mac
Unfortunately without a target computer at disposal the installation has not been executed on Mac. If anyone could successfully install pycassonne on Mac from the source, send me the install steps and it will be included in this file. Thanks in advance!
Changes
Version 0.9.2
- Porting project from Python v2 to v3
- Dynamic board size (display resolution can be changed during gameplay)
- Enhanced GUI (displayed player's last turn and final extra score, displayed final extra score on meeples, configuration auto focus and trace level options, displaying area on clicked subtile, restarting game after its end)
- Stronger AI (with different selectable player's skills)
- Undoing last move of a human player and the preceding computer players' moves
- Game board saving and loading
- Bug fix - computer players transformed to human ones from step #63
- Bug fix - depositing a meeple to a way cross subtile caused runtime error
Version 0.9.1
- Slight modifications in setup.sy to make install almost flawless
- Added INSTALL.txt with installation steps
Version 0.9.0
- Initial version (multiplayer support, AI is rather weak)