PyJanggi
PyJanggi is a Python library for a Korean chess called Janggi. It provides functionalities to simulate a game, maintain a game board, list all possible moves, make a move, and validate a move.
Documentation
Check out the GitHub Page for package documentation.
Getting Started
Using PyJanggi in Your Package
-
Install package via pip:
pip install janggi -
Import in your Python module:
import janggiYou can also import inner modules:
from janggi import JanggiGame, generate_random_game -
Call methods to the
JanggiGameclass instance to play the game.3 public methods are:
make_action(self, origin: Location, dest: Location) -> Tuple[float, bool]get_all_actions(self) -> List[Tuple[Location, Location]]get_all_destinations(self, origin: Location) -> List[Location]
Check out the Documentation section for more details
You can also check out the gym-janggi repository to learn how PyJanggi package can be utilized.
Testing Functionality
PyJanggi is originally designed to be imported by other packages and provide Janggi game logic and classes, but if you want to check if the PyJanggi package is working, you can follow these steps:
-
Clone the repository:
git clone https://github.com/sungho-cho/pyjanggi.git -
Install dependencies:
pip install -r requirements.txt -
Run
main.py:python janggi/main.pyIf you see the UI window and can navigate with left and right arrow keys, your PyJanggi package is working!
Releases
Check out the PyPi Package for releases.
License
This package is licensed under the MIT License.
Metadata
Release files for janggi 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| janggi-1.0.5.tar.gz | 165.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| janggi-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 339.3 kB
Release files / janggi-1.0.5.tar.gz
| Download URL | janggi-1.0.5.tar.gz |
|---|---|
| Size | 165.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4c9c5fa15b11b3a72886061cb46cde49bd4275f440ff1ea9ea079cebef58e04
|
|
BLAKE2b-256 checksum How to use checksums |
8c7266f0f3bd9caefd9c0173b15d552ef2be28254719077fbfc6d862fc074e0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.7
|
Release files / janggi-1.0.5-py3-none-any.whl
| Download URL | janggi-1.0.5-py3-none-any.whl |
|---|---|
| Size | 174.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e24f8909e20a45f18d25e71155c89eacf5ada5258d66056c20608c2a5ec09f31
|
|
BLAKE2b-256 checksum How to use checksums |
b48a49d4506820c92aeaaaa57a39470445a628c047ec0bf3036d4f1be4ca6396
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.7
|