Memory Game on App Inventor
App Inventor is a quite good platform for building android applications. There are many functions that you can use. You can even have parameters on your functions. However, I had a problem with image sizes. It took a long time to understand that App Inventor accepts images with small size.
How do Codes work?
I designed a UI for a memory game.
Then I began to work with code blocks. I created the new app function.
And then, I create a list for my picture and my buttons.
I need to set my images randomly every time I initialize the app. So, to do this I create a function which is called createGameList.
Then I create checkClick function to match the same pictures, when the user clicks on them respectively.
I need to set a picture for every button and need to call checkClick function inside every button. The bad thing is that App Inventor do not pass props or states. That’s why I need to create a component for each button.
At the end, I need to reset the game and user can play this game again and again.
Here is the link to play this game now! Thanks.