Skip to content

Port pycchess to Python 3 so the chess UI can run - #20

Open
timebug wants to merge 1 commit into
masterfrom
cursor/run-python3-chess-app-ffde
Open

Port pycchess to Python 3 so the chess UI can run#20
timebug wants to merge 1 commit into
masterfrom
cursor/run-python3-chess-app-ffde

Conversation

@timebug

@timebug timebug commented Sep 2, 2026

Copy link
Copy Markdown
Owner

The original UI required Python 2.7 and pygame 1.9, which are no longer available on current systems. This ports the pygame client to Python 3 so make && make install && cd pycchess && python3 cchess.py can start the app.

Changes:

  • Python 3 syntax (print(), except ... as, queue.Queue)
  • Integer division for board coordinates
  • subprocess.Popen(..., text=True) for engine I/O
  • Socket send/recv encoding for network play
  • README install notes updated to Python 3 / pygame 2

The C engine is unchanged.

Verified locally: compiled harmless, launched python3 cchess.py, engine replied ucciok, played 中炮; engine answered bestmove h9g7.

Open in Web Open in Cursor 

The original client required Python 2.7; this updates syntax, integer
division, subprocess text mode, and socket encoding for Python 3 and pygame 2.

Co-authored-by: Cong Zhang <timebug.info@gmail.com>
@timebug
timebug marked this pull request as ready for review September 2, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants