Package: chessmaster
Master ChessConsole Script that implements a Chess Challenge.The problem is to find all unique configurations of a set of normal chess pieces on a chess board with dimensions M×N 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.Write a program which takes as input:The dimensions of the board: M, NThe number of pieces of each type (King, Queen, Bishop, Rook and Knight) to try and place on the board.As 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.Build statusHow to installPIPYpip install fbcs_chess_challengeGithubDownload the package from Githubpython setup.py installRun testspython setup.py testsorpython setup.py nosetests –with-coverageRun Console ScriptFor Help(chessmaster)MacBook-Pro:chess_masterfabiobatalha$playchess--helpusage:playchess[-h][--board_sizeBOARD_SIZE][--bishopsBISHOPS][--kinightsKINIGHTS][--kingsKINGS][--pawnsPAWNS][--queensQUEENS][--rooksROOKS][--show_threatening]Buildachessboardwithpieceswhichwillnotthreateningonetoanother.optionalarguments:-h,--helpshowthishelpmessageandexit--board_sizeBOARD_SIZE,-sBOARD_SIZENumberofsquaresintheboard--bishopsBISHOPS,-bBISHOPSNumberofbishops--kinightsKINIGHTS,-iKINIGHTSNumberofkinights--kingsKINGS,-kKINGSNumberofkings--pawnsPAWNS,-pPAWNSNumberofpawns--queensQUEENS,-qQUEENSNumberofQueens--rooksROOKS,-rROOKSNumberofrooks--show_threatening,-tShowthreateningplacesdisplayTintheboardwhenprintingtheresults,otherwiseNonewillbedisplayedRunning Sample(chessmaster)MacBook-Pro:chess_masterfabiobatalha$playchess-s4-i4-r22016-08-1201:22:11,660-masterchess.playchess-INFO-PlayingChess2016-08-1201:22:11,661-masterchess.playchess-INFO-Boardsize:42016-08-1201:22:11,661-masterchess.playchess-INFO-Piecesofbishops:02016-08-1201:22:11,661-masterchess.playchess-INFO-Piecesofkinights:42016-08-1201:22:11,661-masterchess.playchess-INFO-Piecesofkings:02016-08-1201:22:11,661-masterchess.playchess-INFO-Piecesofpawns:02016-08-1201:22:11,661-masterchess.playchess-INFO-Piecesofqueens:02016-08-1201:22:11,662-masterchess.playchess-INFO-Piecesofrooks:2Numberofpossibilities:8Game1:rookNoneNoneNoneNonekinightNonekinightNoneNonerookNoneNonekinightNonekinightGame2:NonekinightNonekinightrookNoneNoneNoneNonekinightNonekinightNoneNonerookNoneGame3:NonerookNoneNonekinightNonekinightNoneNoneNoneNonerookkinightNonekinightNoneGame4:kinightNonekinightNoneNonerookNoneNonekinightNonekinightNoneNoneNoneNonerookGame5:NoneNoneNonerookkinightNonekinightNoneNonerookNoneNonekinightNonekinightNoneGame6:NoneNonerookNoneNonekinightNonekinightrookNoneNoneNoneNonekinightNonekinightGame7:kinightNonekinightNoneNoneNoneNonerookkinightNonekinightNoneNonerookNoneNoneGame8:NonekinightNonekinightNoneNonerookNoneNonekinightNonekinightrookNoneNoneNoneRunning Sample Displaying Threatening places(chessmaster)MacBook-Pro:chess_master fabiobatalha$ playchess -s 4 -i 4 -r 2
2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Playing Chess
2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Board size: 4
2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of bishops: 0
2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of kinights: 4
2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of kings: 0
2016-08-12 01:10:03,481 - masterchess.playchess - INFO - Pieces of pawns: 0
2016-08-12 01:10:03,482 - masterchess.playchess - INFO - Pieces of queens: 0
2016-08-12 01:10:03,482 - masterchess.playchess - INFO - Pieces of rooks: 2
Number of possibilities: 8

Game 1:
kinight T   kinight T
T   T   T   rook
kinight T   kinight T
T   rook    T   T

Game 2:
T   kinight T   kinight
T   T   rook    T
T   kinight T   kinight
rook    T   T   T

Game 3:
kinight T   kinight T
T   rook    T   T
kinight T   kinight T
T   T   T   rook

Game 4:
rook    T   T   T
T   kinight T   kinight
T   T   rook    T
T   kinight T   kinight

Game 5:
T   T   T   rook
kinight T   kinight T
T   rook    T   T
kinight T   kinight T

Game 6:
T   kinight T   kinight
rook    T   T   T
T   kinight T   kinight
T   T   rook    T

Game 7:
T   T   rook    T
T   kinight T   kinight
rook    T   T   T
T   kinight T   kinight

Game 8:
T   rook    T   T
kinight T   kinight T
T   T   T   rook
kinight T   kinight T