Tetris Java Source Code

broken image
broken image

I needed to learn React Fast as I had to rewrite the rendering engine of AG Grid in React.

broken image

You can also Play the Game Hosted on GitPages. The source code for the tiny Tetris game is on Github here and working in Stackblitz here. Reading here you will learn the basic components of writing a simple Game. This blog explains the different parts of the tiny Tetris & React game.

broken image

If you want an example of how these different things can collaborate together in an app smaller than a To Do list, this is the perfect place. My tiny Tetris Application uses many React aspects (Components, Memo's, References, Hooks.) as well as JavaScript Intervals. Writing Tetris is exciting, as it forces you to understand many aspects of a programming language / framework in a very small application. I was amazed when I realised it can be done in less than 200 lines of code when using React! I've written Tetris in C, C++ and Java, and most lately I've written Tetris using JavaScript and React. When I learn a new programming language, one of my favourite things to do is write a simple Tetris game in it.

broken image