Our first assignment in our Object-Oriented Programming class (CS108) was to write a Tetris game using Java. One of the neat things of Java is that it is cross-platform, which means that you can run JTetris under Mac OS X, Solaris, Windows, Linux, etc. In any case, you can either play Tetris, or have the computer play for you using preprogrammed “brains” (LameBrain, MyBrain). MyBrain once reached an all-time high score of 37000+ with the “adversary” turned off (as shown in the screenshot below). (The adversary tries to give ill-fitting pieces.)
Use the Numpad 4 or ‘j’ for LEFT, Numpad 5 or ‘k’ for ROTATE, Numpad 6 or ‘l’ for RIGHT, and Numpad 0 or ‘n’ for DROP.
Download JTetris (27.9 KB).