Skip to main content

PyJanggi

Screen Shot 2022-06-13 at 6 04 29 PM

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

  1. Install package via pip: pip install janggi

  2. Import in your Python module: import janggi

    You can also import inner modules: from janggi import JanggiGame, generate_random_game

  3. Call methods to the JanggiGame class 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:

  1. Clone the repository:

    git clone https://github.com/sungho-cho/pyjanggi.git

  2. Install dependencies:

    pip install -r requirements.txt

  3. Run main.py:

    python janggi/main.py

    If 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)

Source distribution for janggi 1.0.5
File Size Uploaded
janggi-1.0.5.tar.gz 165.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for janggi 1.0.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.20

2 release files

0.9.19

2 release files

0.9.18

2 release files

0.9.17

2 release files

0.9.16

2 release files

0.9.15

2 release files

0.9.14

2 release files

0.9.13

2 release files

0.9.12

2 release files

0.9.11

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page