JavaFX Game Tutorial: Bejeweled (Stream API)

Subscribers:
9,540
Published on ● Video Link: https://www.youtube.com/watch?v=G-kQbNW0TLg



Category:
Tutorial
Duration: 36:28
9,032 views
77


We create a simple clone of game Bejeweled. Also while doing that we just touch the surface of the Stream API and see how a grid based game can be done using only streams.

There is a bug in how points are gathered. It should be i % W, i / H.

Couple of points I missed out on:
1. point - new Jewel(point) can be replaced with Jewel::new, since constructors can also be referenced, just like methods
2. There is no need to "collect" rows and columns each time we call checkState(). We don't alter the objects, so we can pre-compute list for rows and columns during content creation

Source: https://github.com/AlmasB/FXTutorials
Stream API doc: https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html

Twitter: https://twitter.com/AlmasBaim
Sponsor: https://github.com/sponsors/AlmasB/







Tags:
java
java programming tutorial
java game tutorial
game tutorial for beginners
java for beginners
very simple game tutorial
javafx game tutorial
javafx
javafx tutorial
javafx game development
java game development
java bejeweled
java stream api
java streams
java 8 stream
bejeweled game
Bejeweled (Video Game)