Skip to main content

Riichi Royale

Team "The One Cow" for Fall 2020 Performant Programming in Python

For TAs

Project Description

Riichi Royale is a singleplayer game where you play 4-player Riichi Mahjong against AI opponents. The project includes a tutorial so you can learn how to play and (currently) a demo project in order to showcase our C++ Mahjong Game Manager

Python Requirement

Riichi Royale has been verified to run with 64bit Python 3.8.x. We have verified against the Python 3.8.6 Windows x86-64 executable installer default installation, which can be found here.

If you encounter the error ImportError: DLL load failed: %1 is not a valid Win32 application., this is due to having 32bit python.

If you encounter the error ImportError: DLL load failed while importing libmahjong: The specified module could not be found., this is due to not using Python 3.8.

Install

pip install riichiroyale

To run Riichi Royale in your command prompt

riichiroyale

Depending on your installation of python, you may need to instead run

python -m riichiroyale

Development

Getting Started

On Linux

Install the following dependencies:

  • git

  • cmake

  • clang (or clang-10 if on Ubuntu < 20.04LTS)

On Windows

Windows requires Visual Studio 2019, which can be found here, and CMake, which can be found here

Clone the repository:

git clone git@github.com:HartleyAHartley/RiichiRoyale.git

Run the following commands within the project directory (note that these commands are for ):

# Install python dependencies locally
pip install --user -r requirements.txt

# Create build directory for cmake
mkdir build/

# Bootstrap CMake Environment
cmake -S . -B build

# Or bootstrap CMake with tool building enabled
cmake -S . -B build -DPACKAGE_TOOLS=ON

# Or, if wanting to use Clang (Linux Only)

C=clang CXX=clang++ cmake -S . -B build

# Build Project
cmake --build build

# Bootstrap Development Environment
python setup.py develop --user

# Run Project
python riichiroyale

Testing and Documentation

The python test suite is located in test/ and can be run with python test

The C++ test suite is located in cxxtests/ and can be run with make -C build check

Good Resources

DocDevs Mirror of Pygame Documentation: Standard Pygame API Docs. Pygame has a ratelimiter on their website of 50 visits per hour, which is very annoying while developing.

Pygame Example Projects: Great showing of how everything in pygame pieces together.

Pybind11 Docs: The documentation for pybind11, which is what we use for building the C++ python module.

Attribution

Music

lobby.ogg: Airport Lounge by Kevin MacLeod Link: https://incompetech.filmmusic.io/song/3347-airport-lounge License: http://creativecommons.org/licenses/by/4.0/

game1.ogg: Acid Trumpet by Kevin MacLeod Link: https://incompetech.filmmusic.io/song/3340-acid-trumpet License: http://creativecommons.org/licenses/by/4.0/

game2.ogg: Shades of Spring by Kevin MacLeod Link: https://incompetech.filmmusic.io/song/4342-shades-of-spring License: http://creativecommons.org/licenses/by/4.0/

game3.ogg: Backbay Lounge by Kevin MacLeod Link: https://incompetech.filmmusic.io/song/3408-backbay-lounge License: http://creativecommons.org/licenses/by/4.0/

Icons

Icons are by Daniela Travieso, used with permission

Trophy

Trophy Icon by Lorc and used under CC BY 3.0

Metadata

Release files for riichiroyale 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for riichiroyale 1.3.0
File Size Uploaded Provenance
riichiroyale-1.3.0.tar.gz 16.2 MB Without provenance Details

Release files / riichiroyale-1.3.0.tar.gz

Download URL riichiroyale-1.3.0.tar.gz
Size 16.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a3364c46cd1f9165f53690ba5b94ed8357433a19056eb72297c7472cc0233603
BLAKE2b-256 checksum
How to use checksums
aa8edf637fa05af5501a81fcb59be2a8f43cece64deacf32bbe27c750890de7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Security for riichiroyale 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.0 This release

1 release file No provenance

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