Note: This project requires javafx, I recommend using java 1.8.
Reactive & Responsive 2048 game made with the MVVM paradigm using Google's ReactiveX framework. The left view is the normal game view, and the right one is a normalized view. Both views subscribe to the same view model, while the view model observes the game model.
This project was used to practice:
- Responsive programming using ReactiveX
- Better abstractions for less coupling
- Applying design patterns such as:
- Dependency Injection (Provider.java)
- MVVM
- Observer
- Singleton (Provider.java)
- Using states for GUI interaction
- Enter the game size and press
Enterto start the game. Arrowkeys to shift tiles- During any time, press
Rto restart, andESCto quit. - When the game is over (no empty slots and cannot be shifted in any direction), press
RorYto restart, orNto quit.
- bulenkov for 2048 tile color and sizing
- https://codereview.stackexchange.com/a/120644 for matrix clockwise rotation.