niklasf / python-chess

A chess library for Python, with move generation and validation, PGN parsing and writing, Polyglot opening book reading, Gaviota tablebase probing, Syzygy tablebase probing, and UCI/XBoard engine communication
https://python-chess.readthedocs.io/en/latest/
GNU General Public License v3.0
2.45k stars 531 forks source link

some unclear things in documentation #660

Closed yeranosyanvahan closed 4 years ago

yeranosyanvahan commented 4 years ago

hello I have some questions regarding python-chess I am using jupyter-notebook on my windows machine. I don't want to run engines, but I want something to evaluate my board, how do I do that? Also I want to access the movement history and save it somewhere, how do I do that too? and... check if en-passent has happened or not during a game

niklasf commented 4 years ago

This library does not implement any evaluation by itself. You'll have to use a different one or https://python-chess.readthedocs.io/en/latest/engine.html#analysing-and-evaluating-a-position.

All moves that have been pushed so far are stored on board.move_stack: https://python-chess.readthedocs.io/en/latest/core.html#chess.Board.move_stack

To check if move is an en-passant capture, use board.is_en_passant(move) before pushing it: https://python-chess.readthedocs.io/en/latest/core.html#chess.Board.is_en_passant