A Chess Engine in PostScript
See these two articles on seriot.ch:
- To what extend can we execute arbitrary code on a printer?
- How to implement a chess engine in PostScript?
- Can you play chess against your printer?
$ gs -DNOSAFER main.ps
The user plays by entering moves like d2d4.
Console output:
r...r... black h8 e8
pppkb.Q. 320
..bqp...
...p..Np P...............
...B.Pn. npp.............
..P...PB
PP.NP..P -
..KR...R white turn
cat pschess_compact.ps - | nc 172.20.10.2 9100
<enter>
rnbqkbnr
pppppppp 0
........
........ ................
........ ................
........
PPPPPPPP white turn
RNBQKBNR
>d2d4
- human plays white, computer plays black
- pawns convert into queens only
