Hacker News new | past | comments | ask | show | jobs | submit login
A Chess Program in PL/I (github.com/sonarsource)
10 points by deanmen on March 31, 2015 | hide | past | favorite | 3 comments



I had different version of a chess program back in the 80's when I was teaching PL/I. It is a good example of doing something complex (chess) fairly simply in code. This version looks pretty clean, maybe because of the Fortran root.

I'm going to guess that the 5000 / -7500 is an error in the translation, a typo. If I find an hour to kill I may compile it up with -5000 to see what it does.


Why is the white king represented by 5000 but the black king by -7500? All the other white and black pieces have the same absolute value.

(This really brought back memories. I haven't written a PL/I program since 1978.)


Relatively short -- the Fortran version is 500 lines.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: