Answers.Body: <p>Simple problem. <code>python-chess</code> is a useful Python package that can do it for you easily. You will need to get a FEN, check if your move is a legal move.</p>
  
  <blockquote>
    <p><a href="https://pypi.org/project/python-chess/" rel="nofollow noreferrer">https://pypi.org/project/python-chess/</a></p>
  </blockquote>
  
  <p>has everything you want.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-11T17:52:19.243Z
Answers.Text: Hmmm...  It will take me some time to digest Python-Chess.  I don't speak Python.  I am not sure what a package is, or what this specific package can do.  Do you know of any tutorial to get a novice started with Python and this package?  Until then I will take your word for it and accept your answer.  Thanks.
Answers.UserDisplayName: clueless
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T23:45:33.953Z
Answers.LastActivityDate: 2018-12-10T23:45:33.953Z
Answers.UserDisplayName: SmallChess
Body: <p><strong>Background:</strong>  I wrote and use a custom macro in the NoteTab Pro text editor to convert PGN position analysis to XML.  The resulting XML is used on my website to display chess puzzles.  I need to check for legal moves in some cases.  For example, a PGN move might say Rd6 in a position where two rooks can move to d6, but only one of them can legally move to d6 because the other is pinned to its King.  I am disinclined to write a macro legal move checker due to the apparent complexity of the task.  I do not want to reinvent the wheel.</p>
  
  <p>Ideally, I am looking for an executable that can be called with FEN and next-move parameters, and return a positive or negative result based on the move's legality.</p>
  
Tags: <software>
Title: Is there a Open Source or Shareware Legal Move Checker Executable?
ThreadText: # Is there a Open Source or Shareware Legal Move Checker Executable?
  
  (Asked by: username_0 on 2018-12-10)
  
  **Background:** I wrote and use a custom macro in the NoteTab Pro text editor to convert PGN position analysis to XML. The resulting XML is used on my website to display chess puzzles. I need to check for legal moves in some cases. For example, a PGN move might say Rd6 in a position where two rooks can move to d6, but only one of them can legally move to d6 because the other is pinned to its King. I am disinclined to write a macro legal move checker due to the apparent complexity of the task. I do not want to reinvent the wheel.
  
  Ideally, I am looking for an executable that can be called with FEN and next-move parameters, and return a positive or negative result based on the move's legality.
  
  **Tags:** software
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-10. Score: 2 | Accepted answer
  
  Simple problem. `python-chess` is a useful Python package that can do it for you easily. You will need to get a FEN, check if your move is a legal move.
  
  > <https://pypi.org/project/python-chess/>
  
  has everything you want.
  
  > **Comments:**
  > **username_0**: Hmmm...  It will take me some time to digest Python-Chess.  I don't speak Python.  I am not sure what a package is, or what this specific package can do.  Do you know of any tutorial to get a novice started with Python and this package?  Until then I will take your word for it and accept your answer.  Thanks.  
  
  ---
  
  