A streamlit custom component for doubutsushogi (animal chess) game
Project description
streamlit-doubutsushogi
A streamlit custom component for interactive board of doubutsushogi (animal chess) game.
Install
# from pypi
pip3 install streamlit-doubutsushogi
# or from github
# see also the streamlit component API manual (https://docs.streamlit.io/library/components/components-api)
git clone https://github.com/kota7/streamlit-doubutsushogi.git
cd streamlit-doubutsushogi/streamlit_doubutsushogi/frontend
npm run build
pip3 install -U ../../
Usage
See the minimal example at example.py:
import streamlit as st
from streamlit_doubutsushogi import st_doubutsushogi
c1, c2 = st.columns([6, 6])
with c1:
state, status, action = st_doubutsushogi()
if status != 0:
c2.write(f"Game over! Won by the player {status}")
Run the script by:
streamlit run example.py
Doubutsu Shogi Master App
An interactive app is deployed on the Streamlit Cloud. To run the app on the computer locally, run the following:
streamlit run app/streamlit_app.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit-doubutsushogi-0.0.2.tar.gz
(704.0 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-doubutsushogi-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d50d421339f9b47781a00439711a63919a14fbe7b9360b2d47747c90f6cf0f0 |
|
MD5 | d6d36357c63d172f1c6db3038a83dca6 |
|
BLAKE2b-256 | 9785df3a846e5724cda19a1f59fea1c283d09c8c65f47377c48abcca5e5921a4 |
Close
Hashes for streamlit_doubutsushogi-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3663e6aa5d8fa8f55ec1f8319ecb1a3f3e2079608bef09af7e2db99820ba40b |
|
MD5 | 73bba97d7f444b9e709ba16a0d40793b |
|
BLAKE2b-256 | 8b605211ccdd81b818aaffa4730e2326b20b922676617718f0f7a11b81e01dfd |