I’ve created a Tetris applet so that you can play it in IntelliJ IDEA or other JetBrains IDE’s such as Android Studio or PyCharm using the Applet Runner plug-in.
To run it, download the free Applet Runner plugin from JetBrains marketplace and execute the applet located at https://www.japplis.com/applet-runner/tetris/tetris.html