Fast Checkers
=============
.. image:: https://github.com/michalskibinski109/checkers/actions/workflows/python-app.yml/badge.svg
:target: https://github.com/michalskibinski109/checkers/actions/workflows/python-app.yml
.. image:: https://badge.fury.io/py/fast_checkers.svg
:target: https://badge.fury.io/py/fast_checkers
Checkers
--------
*Project still under active developement. Still lacking some important functionality.*
Efficient Modern and flexible implementation of checkers game with beautiful web interface. Supports multiple variants of the game and allows to play against AI.
Documentation
-------------
`Documentation <https://michalskibinski109.github.io/checkers/>`_
Installation
------------
.. code-block:: bash
python -m pip install fast-checkers
Usage
-----
simple
*******
.. code-block:: python
>>> import checkers.american as checkers
>>> board = checkers.Board()
---------------------------------
| | x | | x | | x | | x |
---------------------------------
| x | | x | | x | | x | |
---------------------------------
| | x | | x | | x | | x |
---------------------------------
| | | | | | | | |
---------------------------------
| | | | | | | | |
---------------------------------
| o | | o | | o | | o | |
---------------------------------
| | o | | o | | o | | o |
---------------------------------
| o | | o | | o | | o | |
Moving pieces
*************
.. code-block:: python
>>> board.push_from_str("24-19")
>>> board.push_from_str("12-16")
>>> board.push_from_str("23-18")
>>> board.push_from_str("16x23")
>>> board.push_from_str("26x19")
>>> board.pop()
>>> print(board)
---------------------------------
| | x | | x | | x | | x |
---------------------------------
| x | | x | | x | | x | |
---------------------------------
| | x | | x | | x | | |
---------------------------------
| | | | | | | | |
---------------------------------
| | | | o | | | | |
---------------------------------
| o | | o | | x | | | |
---------------------------------
| | o | | o | | o | | o |
---------------------------------
| o | | o | | o | | o | |
.. code-block:: python
>>> print(list(board.legal_moves))
[Move: 21->17, Move: 22->18, Move: 22->17, Move: 23->19, Move: 23->18, Move: 24->20, Move: 24->19]
Creating custom board
*********************
.. code-block:: python
import checkers.base as checkers
import numpy as np
CUSTOM_POSITION = np.array([1] * 20 + [-1] * 12, dtype=np.int8)
board = checkers.BaseBoard(starting_position=CUSTOM_POSITION)
board.legal_moves = ... # create your own custom legal_moves method (property)
UI
--
.. code-block:: python
from checkers.server import Server
Server().run()
*It is as simple as that!*
.. image:: https://github.com/michalskibinski109/checkers/assets/77834536/4ec36e49-38cc-45e8-a500-d0d24b21fce7
:width: 600
.. image:: https://github.com/michalskibinski109/checkers/assets/77834536/b7e0bf73-1bc5-4769-8f82-a22cde3b7e90
:width: 600
*pseudo legal moves for selected square*
.. image:: https://github.com/michalskibinski109/checkers/assets/77834536/ef64179a-1e7d-46d4-991e-5a34fc803d7e
:width: 600
Contributing
------------
Contributions to this project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the project repository.
Bibliography
------------
1. `notation <https://en.wikipedia.org/wiki/Portable_Draughts_Notation>`_
2. `rules and variants <https://en.wikipedia.org/wiki/Checkers>`_
3. `list of pdns <https://github.com/mig0/Games-Checkers/>`_
4. `droughts online <https://lidraughts.org/>`_
5. `additional 1 (checkers online) <https://checkers.online/play>`_
6. `additional 2 (chinook) <https://webdocs.cs.ualberta.ca/~chinook/play/notation.html>`_
Raw data
{
"_id": null,
"home_page": "https://github.com/michalskibinski109/checkers",
"name": "fast-checkers",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "checkers AI mini-max droughts,game,board",
"author": "Micha\u0142 Skibi\u0144ski",
"author_email": "mskibinski109@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/42/70/5c65acc7a739aef2d2423758d25702db053cd6a0951bb04e58272bea202f/fast-checkers-0.3.1.tar.gz",
"platform": null,
"description": "Fast Checkers\n=============\n\n.. image:: https://github.com/michalskibinski109/checkers/actions/workflows/python-app.yml/badge.svg\n :target: https://github.com/michalskibinski109/checkers/actions/workflows/python-app.yml\n\n.. image:: https://badge.fury.io/py/fast_checkers.svg\n :target: https://badge.fury.io/py/fast_checkers\n\nCheckers\n--------\n\n*Project still under active developement. Still lacking some important functionality.*\n\nEfficient Modern and flexible implementation of checkers game with beautiful web interface. Supports multiple variants of the game and allows to play against AI.\n\nDocumentation\n-------------\n\n`Documentation <https://michalskibinski109.github.io/checkers/>`_\n\nInstallation\n------------\n\n.. code-block:: bash\n\n python -m pip install fast-checkers\n\nUsage\n-----\n\nsimple\n*******\n\n.. code-block:: python\n\n >>> import checkers.american as checkers\n\n >>> board = checkers.Board()\n ---------------------------------\n | | x | | x | | x | | x |\n ---------------------------------\n | x | | x | | x | | x | |\n ---------------------------------\n | | x | | x | | x | | x |\n ---------------------------------\n | | | | | | | | |\n ---------------------------------\n | | | | | | | | |\n ---------------------------------\n | o | | o | | o | | o | |\n ---------------------------------\n | | o | | o | | o | | o |\n ---------------------------------\n | o | | o | | o | | o | |\n\n\nMoving pieces\n*************\n\n.. code-block:: python\n\n >>> board.push_from_str(\"24-19\")\n >>> board.push_from_str(\"12-16\")\n >>> board.push_from_str(\"23-18\")\n >>> board.push_from_str(\"16x23\")\n >>> board.push_from_str(\"26x19\")\n >>> board.pop()\n >>> print(board)\n ---------------------------------\n | | x | | x | | x | | x |\n ---------------------------------\n | x | | x | | x | | x | |\n ---------------------------------\n | | x | | x | | x | | |\n ---------------------------------\n | | | | | | | | |\n ---------------------------------\n | | | | o | | | | |\n ---------------------------------\n | o | | o | | x | | | |\n ---------------------------------\n | | o | | o | | o | | o |\n ---------------------------------\n | o | | o | | o | | o | |\n\n\n.. code-block:: python\n\n >>> print(list(board.legal_moves))\n [Move: 21->17, Move: 22->18, Move: 22->17, Move: 23->19, Move: 23->18, Move: 24->20, Move: 24->19]\n\nCreating custom board\n*********************\n\n.. code-block:: python\n\n import checkers.base as checkers\n import numpy as np\n CUSTOM_POSITION = np.array([1] * 20 + [-1] * 12, dtype=np.int8)\n board = checkers.BaseBoard(starting_position=CUSTOM_POSITION)\n board.legal_moves = ... # create your own custom legal_moves method (property)\n\nUI\n--\n\n.. code-block:: python\n\n from checkers.server import Server\n Server().run()\n\n*It is as simple as that!*\n\n\n.. image:: https://github.com/michalskibinski109/checkers/assets/77834536/4ec36e49-38cc-45e8-a500-d0d24b21fce7\n :width: 600\n\n.. image:: https://github.com/michalskibinski109/checkers/assets/77834536/b7e0bf73-1bc5-4769-8f82-a22cde3b7e90\n :width: 600\n\n*pseudo legal moves for selected square* \n\n.. image:: https://github.com/michalskibinski109/checkers/assets/77834536/ef64179a-1e7d-46d4-991e-5a34fc803d7e\n :width: 600\n\nContributing\n------------\n\nContributions to this project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the project repository.\n\nBibliography\n------------\n\n1. `notation <https://en.wikipedia.org/wiki/Portable_Draughts_Notation>`_\n2. `rules and variants <https://en.wikipedia.org/wiki/Checkers>`_\n3. `list of pdns <https://github.com/mig0/Games-Checkers/>`_\n4. `droughts online <https://lidraughts.org/>`_\n5. `additional 1 (checkers online) <https://checkers.online/play>`_\n6. `additional 2 (chinook) <https://webdocs.cs.ualberta.ca/~chinook/play/notation.html>`_\n",
"bugtrack_url": null,
"license": "GPL-3.0+",
"summary": "A checkers library for Python, with move generation and validation, PDN parsing and writing. Supprots multiple variants of game.",
"version": "0.3.1",
"project_urls": {
"Documentation": "https://michalskibinski109.github.io/checkers/index.html",
"Homepage": "https://github.com/michalskibinski109/checkers"
},
"split_keywords": [
"checkers ai mini-max droughts",
"game",
"board"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cb2ecb0004e7289c611f93bc4fd657a1797fdfeba3c524d7ccbb1aecee8e17db",
"md5": "ab128c0fd6e91652e3acf4700cec99b0",
"sha256": "279a38adcb200a1516e332a178bb4bb5878b519acf74095808b559720034dcad"
},
"downloads": -1,
"filename": "fast_checkers-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ab128c0fd6e91652e3acf4700cec99b0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 30922,
"upload_time": "2023-07-11T09:46:43",
"upload_time_iso_8601": "2023-07-11T09:46:43.986581Z",
"url": "https://files.pythonhosted.org/packages/cb/2e/cb0004e7289c611f93bc4fd657a1797fdfeba3c524d7ccbb1aecee8e17db/fast_checkers-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42705c65acc7a739aef2d2423758d25702db053cd6a0951bb04e58272bea202f",
"md5": "4b25e8b91d0d279d486f9863208b243e",
"sha256": "f5cd9188394654aae29fcd31c41d8bb9bd11ee37442673204b604b7bf72e3dd1"
},
"downloads": -1,
"filename": "fast-checkers-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "4b25e8b91d0d279d486f9863208b243e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 29504,
"upload_time": "2023-07-11T09:46:45",
"upload_time_iso_8601": "2023-07-11T09:46:45.442154Z",
"url": "https://files.pythonhosted.org/packages/42/70/5c65acc7a739aef2d2423758d25702db053cd6a0951bb04e58272bea202f/fast-checkers-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-11 09:46:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "michalskibinski109",
"github_project": "checkers",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "fast-checkers"
}