{ "info": { "author": "Fabio Batalha", "author_email": "fabiobatalha@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "Master Chess\n============\n\nConsole Script that implements a Chess Challenge.\n\nThe problem is to find all unique configurations of a set of normal chess pieces on a chess board with dimensions M\u00d7N where none of the pieces is in a position to take any of the others. Assume the colour of the piece does not matter, and that there are no pawns among the pieces.\n\nWrite a program which takes as input:\n\nThe dimensions of the board: M, N\n\nThe number of pieces of each type (King, Queen, Bishop, Rook and Knight) to try and place on the board.\n\nAs output, the program should list all the unique configurations to the console for which all of the pieces can be placed on the board without threatening each other.\n\nBuild status\n============\n\n.. image:: https://travis-ci.org/fabiobatalha/chess_master.svg?branch=master\n :target: https://travis-ci.org/fabiobatalha/chess_master\n\nHow to install\n==============\n\nPIPY\n----\n\npip install fbcs_chess_challenge\n\nGithub\n------\n\n* Download the package from Github\n* python setup.py install\n\nRun tests\n=========\n\npython setup.py tests\n\nor\n\npython setup.py nosetests --with-coverage\n\nRun Console Script\n==================\n\nFor Help\n--------\n\n.. code-block:: shell\n\n (chessmaster)MacBook-Pro:chess_master fabiobatalha$ playchess --help\n \n usage: playchess [-h] [--board_size BOARD_SIZE] [--bishops BISHOPS]\n [--kinights KINIGHTS] [--kings KINGS] [--pawns PAWNS]\n [--queens QUEENS] [--rooks ROOKS] [--show_threatening]\n\n Build a chess board with pieces which will not threatening one to another.\n\n optional arguments:\n -h, --help show this help message and exit\n --board_size BOARD_SIZE, -s BOARD_SIZE\n Number of squares in the board\n --bishops BISHOPS, -b BISHOPS\n Number of bishops\n --kinights KINIGHTS, -i KINIGHTS\n Number of kinights\n --kings KINGS, -k KINGS\n Number of kings\n --pawns PAWNS, -p PAWNS\n Number of pawns\n --queens QUEENS, -q QUEENS\n Number of Queens\n --rooks ROOKS, -r ROOKS\n Number of rooks\n --show_threatening, -t\n Show threatening places display T in the board when\n printing the results, otherwise None will be displayed\n\nRunning Sample\n--------------\n\n.. code-block:: shell\n\n (chessmaster)MacBook-Pro:chess_master fabiobatalha$ playchess -s 4 -i 4 -r 2\n 2016-08-12 01:22:11,660 - masterchess.playchess - INFO - Playing Chess\n 2016-08-12 01:22:11,661 - masterchess.playchess - INFO - Board size: 4\n 2016-08-12 01:22:11,661 - masterchess.playchess - INFO - Pieces of bishops: 0\n 2016-08-12 01:22:11,661 - masterchess.playchess - INFO - Pieces of kinights: 4\n 2016-08-12 01:22:11,661 - masterchess.playchess - INFO - Pieces of kings: 0\n 2016-08-12 01:22:11,661 - masterchess.playchess - INFO - Pieces of pawns: 0\n 2016-08-12 01:22:11,661 - masterchess.playchess - INFO - Pieces of queens: 0\n 2016-08-12 01:22:11,662 - masterchess.playchess - INFO - Pieces of rooks: 2\n Number of possibilities: 8\n\n Game 1:\n rook None None None\n None kinight None kinight\n None None rook None\n None kinight None kinight\n\n Game 2:\n None kinight None kinight\n rook None None None\n None kinight None kinight\n None None rook None\n\n Game 3:\n None rook None None\n kinight None kinight None\n None None None rook\n kinight None kinight None\n\n Game 4:\n kinight None kinight None\n None rook None None\n kinight None kinight None\n None None None rook\n\n Game 5:\n None None None rook\n kinight None kinight None\n None rook None None\n kinight None kinight None\n\n Game 6:\n None None rook None\n None kinight None kinight\n rook None None None\n None kinight None kinight\n\n Game 7:\n kinight None kinight None\n None None None rook\n kinight None kinight None\n None rook None None\n\n Game 8:\n None kinight None kinight\n None None rook None\n None kinight None kinight\n rook None None None\n\nRunning Sample Displaying Threatening places\n--------------------------------------------\n\n.. code-block::\n\n (chessmaster)MacBook-Pro:chess_master fabiobatalha$ playchess -s 4 -i 4 -r 2\n 2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Playing Chess\n 2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Board size: 4\n 2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of bishops: 0\n 2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of kinights: 4\n 2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of kings: 0\n 2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of pawns: 0\n 2016-08-12 01:10:03,482 - masterchess.playchess - INFO - Pieces of queens: 0\n 2016-08-12 01:10:03,482 - masterchess.playchess - INFO - Pieces of rooks: 2\n Number of possibilities: 8\n\n Game 1:\n kinight T kinight T\n T T T rook\n kinight T kinight T\n T rook T T\n\n Game 2:\n T kinight T kinight\n T T rook T\n T kinight T kinight\n rook T T T\n\n Game 3:\n kinight T kinight T\n T rook T T\n kinight T kinight T\n T T T rook\n\n Game 4:\n rook T T T\n T kinight T kinight\n T T rook T\n T kinight T kinight\n\n Game 5:\n T T T rook\n kinight T kinight T\n T rook T T\n kinight T kinight T\n\n Game 6:\n T kinight T kinight\n rook T T T\n T kinight T kinight\n T T rook T\n\n Game 7:\n T T rook T\n T kinight T kinight\n rook T T T\n T kinight T kinight\n\n Game 8:\n T rook T T\n kinight T kinight T\n T T T rook\n kinight T kinight T\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fabiobatalha/chess_master", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "chessmaster", "package_url": "https://pypi.org/project/chessmaster/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/chessmaster/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/fabiobatalha/chess_master" }, "release_url": "https://pypi.org/project/chessmaster/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "Chess Master Challenge", "version": "1.1.1" }, "last_serial": 2278728, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "7915e7cba96760debccaf5c3adff86e2", "sha256": "9609b2d6e6b332cc9c45fe1d6c7c7a817ec1d24e55573fffe46117161af68ba5" }, "downloads": -1, "filename": "chessmaster-1.0.tar.gz", "has_sig": false, "md5_digest": "7915e7cba96760debccaf5c3adff86e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8317, "upload_time": "2016-08-12T05:01:08", "url": "https://files.pythonhosted.org/packages/75/7d/c5899892c36a1e1c432b0b898776a8f3be88d670657f5277d199d838ab0f/chessmaster-1.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "3687b3995eb9ad9ec6ed0e385e6f4409", "sha256": "292bdd4dd378c16aace4bc37040d3d936509b119c7ffb9250fcd70962232c791" }, "downloads": -1, "filename": "chessmaster-1.1.0.tar.gz", "has_sig": false, "md5_digest": "3687b3995eb9ad9ec6ed0e385e6f4409", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8320, "upload_time": "2016-08-12T05:06:52", "url": "https://files.pythonhosted.org/packages/61/ab/ad8b8dbfcd1f989e06783acd8b58087f2d16abf005ecd7f084fea73cf5f5/chessmaster-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "3ee8fe08c2ec6766e60e6d1c28884579", "sha256": "2b48b4abdfd842101d83e01e523592648363752adca13d20ec9dd0c12f65914d" }, "downloads": -1, "filename": "chessmaster-1.1.1.tar.gz", "has_sig": false, "md5_digest": "3ee8fe08c2ec6766e60e6d1c28884579", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8532, "upload_time": "2016-08-12T18:50:34", "url": "https://files.pythonhosted.org/packages/7c/56/80f6dbec0c11061eabcc9dfdbff04309691071e0fea261eb05b432a0924b/chessmaster-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ee8fe08c2ec6766e60e6d1c28884579", "sha256": "2b48b4abdfd842101d83e01e523592648363752adca13d20ec9dd0c12f65914d" }, "downloads": -1, "filename": "chessmaster-1.1.1.tar.gz", "has_sig": false, "md5_digest": "3ee8fe08c2ec6766e60e6d1c28884579", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8532, "upload_time": "2016-08-12T18:50:34", "url": "https://files.pythonhosted.org/packages/7c/56/80f6dbec0c11061eabcc9dfdbff04309691071e0fea261eb05b432a0924b/chessmaster-1.1.1.tar.gz" } ] }