prmr / Solitaire

Implementation of the Solitaire card game with JavaFX
GNU General Public License v2.0
26 stars 38 forks source link

Retire the use of the Singleton pattern for GameModel #25

Closed prmr closed 3 years ago

prmr commented 3 years ago

The GameModel is currently a Singleton. This hinders the use of dependency injection with this instance, and makes testing more complex. Instead, we can still have just one instance of this object, without it being globally available by only initializing it in the application's start method.