3 ms·
A Chess Program in PL/I
- deanmen 12y agoRelatively short -- the Fortran version is 500 lines.
- greenyoda 12y agoWhy 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.)
- AstroJetson 12y agoI 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.