JavaFX Game Tutorial: Memory Puzzle
In this tutorial we make a very simple game - Memory Puzzle.
Exercises/extensions:
1. Use ImageView with images instead of Text. Hint: you can use same Image object for 2 different ImageView objects and check equiality by checking Image references.
2. Allow players to restart the game once they have completed the board. Hint: every time the tiles are succesfully opened increase a counter and then check against number of pairs in the game.
3. Add a timer. Hint: you can use of the Transition classes to easily implement a timer and perform some operation with setOnFinished(). For intermediate students: attempt implementing a separate thread.
4. Fix a bug which allows to keep the tile open if you manage to click on the tile while the animation is being played. Hint: use a boolean flag to keep track of animation start and end and do not allow the mouse click event to happen if the animation is playing.
5. Use RotateTransition to make the tiles rotate during open / close.
Source: https://github.com/AlmasB/FXTutorials/blob/master/src/com/almasb/mp/MemoryPuzzleApp.java
Please complete this 3 question survey which takes less than 10 seconds https://www.surveymonkey.com/s/72626MD so I can improve the channel content
Other Videos By Almas Baim (AlmasB)
Other Statistics
Me && MORY Statistics For Almas Baim (AlmasB)
There are 23,854 views in 1 video for Me && MORY. His channel published less than an hour of Me && MORY content, making up less than 0.43% of the total overall content on Almas Baim (AlmasB)'s YouTube channel.