Class ModelFactoryImpl
java.lang.Object
ca.uqam.info.student.skyjo.controller.ModelFactoryImpl
- All Implemented Interfaces:
ca.uqam.info.max.skyjo.controller.ModelFactory
public class ModelFactoryImpl
extends Object
implements ca.uqam.info.max.skyjo.controller.ModelFactory
Implementation of the ModelFactory interface.
This class provides instances of the application's model.
It encapsulates the instantiation to ensure a cnetralized way
of creating model objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionca.uqam.info.max.skyjo.model.SkyjoModelcreateModel(ca.uqam.info.max.skyjo.controller.ModelPreset modelPreset, String[] strings, Random random) Creates and returns a new instance of the Skyjo model.
-
Constructor Details
-
ModelFactoryImpl
public ModelFactoryImpl()Default constructor.
-
-
Method Details
-
createModel
public ca.uqam.info.max.skyjo.model.SkyjoModel createModel(ca.uqam.info.max.skyjo.controller.ModelPreset modelPreset, String[] strings, Random random) Creates and returns a new instance of the Skyjo model.- Specified by:
createModelin interfaceca.uqam.info.max.skyjo.controller.ModelFactory- Parameters:
modelPreset- the preset configuration for the model (e.g. layout or rules)strings- the names of the players participating in the gamerandom- a random generator used for shuffling or randomness- Returns:
- a new instance of SkyjoModelImpl.
-