{ "info": { "author": "ImparaAI", "author_email": "author@example.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "A Python3 library that you can use to play a game of checkers/draughts. This is just a set of classes that you can use in your code, it's not an interactive shell checkersgame.\n\n- **Version:** 1.4.2\n\n[![Build Status](https://travis-ci.org/ImparaAI/checkers.png?branch=master)](https://travis-ci.org/ImparaAI/checkers)\n\n# Assumptions\n\nThe rules used are for competitive American checkers or English draughts. This means an 8x8 board with force captures and regular kings.\n\nEach position on the board is numbered 1 to 32. Each move is represented as an array with two values: starting position and ending position. So if you're starting a new game, one of the available moves is `[9, 13]` for player 1. If there's a capture move, the ending position is the position the capturing piece will land on (i.e. two rows from its original row), which might look like `[13, 22]`.\n\nEach piece movement is completely distinct, even if the move is part of a multiple capture series. In [Portable Draughts Notation](https://en.wikipedia.org/wiki/Portable_Draughts_Notation) mutli-capture series are usually represented by a `5-32` (for a particularly long series of jumps), but in certain situations there could be multiple pathways to achieve that final position. This game requires an explicit spelling out of each distinct move in the multi-capture series.\n\n# Usage\n\nCreate a new game:\n\n```python\nfrom checkers.game import Game\n\ngame = Game()\n```\n\nSee whose turn it is:\n\n```python\ngame.whose_turn() #1 or 2\n```\n\nGet the possible moves:\n\n```python\ngame.get_possible_moves() #[[9, 13], [9, 14], [10, 14], [10, 15], [11, 15], [11, 16], [12, 16]]\n```\n\nMake a move:\n\n```python\ngame.move([9, 13])\n```\n\nCheck if the game is over:\n\n```python\ngame.is_over() #True or False\n```\n\nFind out who won:\n\n```python\ngame.get_winner() #None or 1 or 2\n```\n\nReview the move history:\n\n```python\ngame.moves #[[int, int], [int, int], ...]\n```\n\nChange the consecutive noncapture move limit (default `40` according to the [rules](http://www.usacheckers.com/rulesofcheckers.php)):\n\n```python\ngame.consecutive_noncapture_move_limit = 20\ngame.move_limit_reached() #True or False\n```\n\nReview the pieces on the board:\n\n```python\nfor piece in game.board.pieces:\n\tpiece.player #1 or 2\n\tpiece.other_player #1 or 2\n\tpiece.king #True or False\n\tpiece.captured #True or False\n\tpiece.position #1-32\n\tpiece.get_possible_capture_moves() #[[int, int], [int, int], ...]\n\tpiece.get_possible_positional_moves() #[[int, int], [int, int], ...]\n```\n\n# Testing\n\nRun `python3 -m unittest discover` from the root.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ImparaAI/checkers", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "imparaai-checkers", "package_url": "https://pypi.org/project/imparaai-checkers/", "platform": "", "project_url": "https://pypi.org/project/imparaai-checkers/", "project_urls": { "Homepage": "https://github.com/ImparaAI/checkers" }, "release_url": "https://pypi.org/project/imparaai-checkers/1.4.2/", "requires_dist": null, "requires_python": "", "summary": "Library for playing a standard game of checkers/draughts", "version": "1.4.2" }, "last_serial": 5993219, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8b76b8975824d49dca0c76502d19f99f", "sha256": "e779f5d1be38c5d2e73a4701b3bcc5c0a4fd6c8ad302e2bc57ed1cd6d86b932f" }, "downloads": -1, "filename": "imparaai_checkers-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8b76b8975824d49dca0c76502d19f99f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8864, "upload_time": "2018-09-14T20:57:03", "url": "https://files.pythonhosted.org/packages/ad/f5/a52e14f0657ca36ce4fdfa58226bf815fb79b48bc20cb87b72174bd3ddcd/imparaai_checkers-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5834cedc990633051e76ac410591906", "sha256": "c53f2fb39992adc1bfb1160ef73ae65f83dd1e3c75635cfc532badfdb6d4d8c5" }, "downloads": -1, "filename": "imparaai-checkers-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e5834cedc990633051e76ac410591906", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5968, "upload_time": "2018-09-14T20:57:05", "url": "https://files.pythonhosted.org/packages/f8/b0/bad5122ac0ec547c2b22f4555b588c0b18353b3368b890feb8a92c3890b1/imparaai-checkers-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "9d855b700daf4c4472e326193858aaf3", "sha256": "541d5c772800c5c1ab12c251c2afd1241807f39f753284905f64db4948afc67d" }, "downloads": -1, "filename": "imparaai-checkers-1.1.0.tar.gz", "has_sig": false, "md5_digest": "9d855b700daf4c4472e326193858aaf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5899, "upload_time": "2018-09-14T22:09:33", "url": "https://files.pythonhosted.org/packages/b7/e5/f21ad8a90d7d054d9e89f25cad9a287df7df52d6210ee97ecf5f723c137e/imparaai-checkers-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "a6aeec961ec04377d203bd90763da9e3", "sha256": "4ac5f540d8e69861a658d9c410fdb4d4811579ca204bc41afc82c7f48e77b61f" }, "downloads": -1, "filename": "imparaai-checkers-1.2.0.tar.gz", "has_sig": false, "md5_digest": "a6aeec961ec04377d203bd90763da9e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5895, "upload_time": "2018-09-14T22:23:08", "url": "https://files.pythonhosted.org/packages/44/77/b9fd4a736b75ff537f955001f92fc664b61fcaf10b7b9fb27fc4292c81f8/imparaai-checkers-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "0b33564618fbc755530a14164c5146e1", "sha256": "f55e880c99d5bd787e1e783164d84be45883f5fbde76bdf4647ce44928471425" }, "downloads": -1, "filename": "imparaai-checkers-1.2.1.tar.gz", "has_sig": false, "md5_digest": "0b33564618fbc755530a14164c5146e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5894, "upload_time": "2018-09-14T22:37:33", "url": "https://files.pythonhosted.org/packages/d3/53/bab0195ce1fe41d383843ef145f3d6f6ee68d5356bff22bda735f1f85abc/imparaai-checkers-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "4723d04e30fad2f0401fd0ddccbb3318", "sha256": "fef9705ba2feaba158c2657ebb93b602aef8ab055a63e2db252c90fecb7782a1" }, "downloads": -1, "filename": "imparaai-checkers-1.2.2.tar.gz", "has_sig": false, "md5_digest": "4723d04e30fad2f0401fd0ddccbb3318", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6885, "upload_time": "2018-09-15T01:18:58", "url": "https://files.pythonhosted.org/packages/6e/9f/913c811ae3483ce260c22963d980aedef6e9a9f30d290aba399ac031a02e/imparaai-checkers-1.2.2.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "fd538c94d0f5cf2d3d2bd978161e2582", "sha256": "4976abd981bbeb0f943b76e99aba3d0626eef7cd2f5565a034b0c43328808009" }, "downloads": -1, "filename": "imparaai-checkers-1.3.0.tar.gz", "has_sig": false, "md5_digest": "fd538c94d0f5cf2d3d2bd978161e2582", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6921, "upload_time": "2018-11-08T01:23:41", "url": "https://files.pythonhosted.org/packages/43/85/44058a8d5d6bd4901b2b1b4c32ab659d1b58d02441ed90300c24087ed42f/imparaai-checkers-1.3.0.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "b84b21e106603097e0cef804e1da3b5a", "sha256": "f9d5e9d38c620aabd7dff0f911480f9ca6e83edcc681ff3e3cc0f8a772135ebe" }, "downloads": -1, "filename": "imparaai-checkers-1.4.0.tar.gz", "has_sig": false, "md5_digest": "b84b21e106603097e0cef804e1da3b5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7233, "upload_time": "2018-11-14T01:08:47", "url": "https://files.pythonhosted.org/packages/d5/d8/e9983ad6b4faacaba1767124f2abf338627c6b27e427b145903fe670b41a/imparaai-checkers-1.4.0.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "87db10a7c030baaccbadd7ab4e3738be", "sha256": "33ba78d3eca11a7446df1dd29e62e1d035ae7f4b4ed1e2ebf81ec6b22eebc752" }, "downloads": -1, "filename": "imparaai-checkers-1.4.1.tar.gz", "has_sig": false, "md5_digest": "87db10a7c030baaccbadd7ab4e3738be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7234, "upload_time": "2018-11-14T01:23:06", "url": "https://files.pythonhosted.org/packages/8a/16/cfdfcda0472524fb411c7a7ba70c42f07c43c6abe5a5137af1112e3a4516/imparaai-checkers-1.4.1.tar.gz" } ], "1.4.2": [ { "comment_text": "", "digests": { "md5": "cac76d0c928c3d54afb678304a4e4cca", "sha256": "668e8be70ca2bb94875af6f1c2645eb085f723d6d6a30bb19eb7ffb6dc57c725" }, "downloads": -1, "filename": "imparaai-checkers-1.4.2.tar.gz", "has_sig": false, "md5_digest": "cac76d0c928c3d54afb678304a4e4cca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8192, "upload_time": "2019-10-18T01:32:04", "url": "https://files.pythonhosted.org/packages/9e/b3/02519108b7601f7c31e84d68afc758591e3db1f24dbaa169c51f1b404a5b/imparaai-checkers-1.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cac76d0c928c3d54afb678304a4e4cca", "sha256": "668e8be70ca2bb94875af6f1c2645eb085f723d6d6a30bb19eb7ffb6dc57c725" }, "downloads": -1, "filename": "imparaai-checkers-1.4.2.tar.gz", "has_sig": false, "md5_digest": "cac76d0c928c3d54afb678304a4e4cca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8192, "upload_time": "2019-10-18T01:32:04", "url": "https://files.pythonhosted.org/packages/9e/b3/02519108b7601f7c31e84d68afc758591e3db1f24dbaa169c51f1b404a5b/imparaai-checkers-1.4.2.tar.gz" } ] }