About ...
In 1997 I implemented Tetris using the then still relatively new Java programming language. It ran as an applet from within the browser. Thought I'd resurrect it but modern browsers no longer allow Java applets. So I asked ChatGPT to convert the code to the modern equivalent (HTML5/Canvas). It offered up the code for the below; pretty much exactly how I remember it; it just worked; not bad.

1997 Java Tetris Applet Port

StatusReady
Pieces0
Lines0
Tetrises0
Speed800ms
Next
Keys
/J left, /L right, down,
/K rotate left, End/I rotate right,
Space/Enter/0 drop, P pause/resume.
Touch buttons: move left/right, rotate left/right, and drop all the way.
Debug: Ctrl-D, then PgUp, X, N, 07.