chess.py functional