||The first one of these I did was to learn X windows. It was a good program - the executable for a single basic board was only about 120 lines, almost all the complexity was in a large, static data structure. Unfortunately, when I left that job (IBM) I took the C code, but forgot to bring the data file, which made the code pretty worthless.
I wrote tetrii in Java a long time ago - Java 1.3. A few things stopped working as Java progressed and so have been disabled, and the graphics aren't quite right. Maybe I will fix it some day. Play it, download it, or look at the code.