Package com.edu.xmum.CST210.Factory
Class GameViewFactory
java.lang.Object
com.edu.xmum.CST210.Factory.AbstractFactory
com.edu.xmum.CST210.Factory.GameViewFactory
GameViewFactory is responsible for creating instances of different views (Victory, Maze, Run, Player, Prepare, Welcome, and Selection)
based on the specified skin.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMazeView(Skin maze, IMazeModel mazeModel) Creates and returns an instance of IMazeView based on the specified skin and maze model.getPlayerView(Skin player, IPlayerModel playerModel) Creates and returns an instance of IPlayerView based on the specified skin and player model.getPrepareView(Skin prepareView) Creates and returns an instance of IPrepareView based on the specified skin.getRunView(Skin runView, IGameController gameController) Creates and returns an instance of IRunView based on the specified skin and game controller.getSelectionView(Skin selectionView) Creates and returns an instance of ISelectionView based on the specified skin.getVictoryView(Skin victoryView) Creates and returns an instance of IVictoryView based on the specified skin.getWelcomeView(Skin welcomeView) Creates and returns an instance of IWelcomeView based on the specified skin.Methods inherited from class com.edu.xmum.CST210.Factory.AbstractFactory
getAiService, getGameController, getGameModel, getGameService, getMazeModel, getMazeService, getPlayerModel, getPlayerService
-
Constructor Details
-
GameViewFactory
public GameViewFactory()
-
-
Method Details
-
getVictoryView
Creates and returns an instance of IVictoryView based on the specified skin.- Overrides:
getVictoryViewin classAbstractFactory- Parameters:
victoryView- The skin enumeration that determines which victory view to create.- Returns:
- An instance of IVictoryView.
-
getMazeView
Creates and returns an instance of IMazeView based on the specified skin and maze model.- Overrides:
getMazeViewin classAbstractFactory- Parameters:
maze- The skin enumeration that determines which maze view to create.mazeModel- The maze model associated with the maze view.- Returns:
- An instance of IMazeView.
-
getRunView
Creates and returns an instance of IRunView based on the specified skin and game controller.- Overrides:
getRunViewin classAbstractFactory- Parameters:
runView- The skin enumeration that determines which run view to create.gameController- The game controller associated with the run view.- Returns:
- An instance of IRunView.
-
getPlayerView
Creates and returns an instance of IPlayerView based on the specified skin and player model.- Overrides:
getPlayerViewin classAbstractFactory- Parameters:
player- The skin enumeration that determines which player view to create.playerModel- The player model associated with the player view.- Returns:
- An instance of IPlayerView.
-
getPrepareView
Creates and returns an instance of IPrepareView based on the specified skin.- Overrides:
getPrepareViewin classAbstractFactory- Parameters:
prepareView- The skin enumeration that determines which prepare view to create.- Returns:
- An instance of IPrepareView.
-
getWelcomeView
Creates and returns an instance of IWelcomeView based on the specified skin.- Overrides:
getWelcomeViewin classAbstractFactory- Parameters:
welcomeView- The skin enumeration that determines which welcome view to create.- Returns:
- An instance of IWelcomeView.
-
getSelectionView
Creates and returns an instance of ISelectionView based on the specified skin.- Overrides:
getSelectionViewin classAbstractFactory- Parameters:
selectionView- The skin enumeration that determines which selection view to create.- Returns:
- An instance of ISelectionView.
-