Class GameViewFactory

java.lang.Object
com.edu.xmum.CST210.Factory.AbstractFactory
com.edu.xmum.CST210.Factory.GameViewFactory

public class GameViewFactory extends AbstractFactory
GameViewFactory is responsible for creating instances of different views (Victory, Maze, Run, Player, Prepare, Welcome, and Selection) based on the specified skin.
  • Constructor Details

    • GameViewFactory

      public GameViewFactory()
  • Method Details

    • getVictoryView

      public IVictoryView getVictoryView(Skin victoryView)
      Creates and returns an instance of IVictoryView based on the specified skin.
      Overrides:
      getVictoryView in class AbstractFactory
      Parameters:
      victoryView - The skin enumeration that determines which victory view to create.
      Returns:
      An instance of IVictoryView.
    • getMazeView

      public IMazeView getMazeView(Skin maze, IMazeModel mazeModel)
      Creates and returns an instance of IMazeView based on the specified skin and maze model.
      Overrides:
      getMazeView in class AbstractFactory
      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

      public IRunView getRunView(Skin runView, IGameController gameController)
      Creates and returns an instance of IRunView based on the specified skin and game controller.
      Overrides:
      getRunView in class AbstractFactory
      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

      public IPlayerView getPlayerView(Skin player, IPlayerModel playerModel)
      Creates and returns an instance of IPlayerView based on the specified skin and player model.
      Overrides:
      getPlayerView in class AbstractFactory
      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

      public IPrepareView getPrepareView(Skin prepareView)
      Creates and returns an instance of IPrepareView based on the specified skin.
      Overrides:
      getPrepareView in class AbstractFactory
      Parameters:
      prepareView - The skin enumeration that determines which prepare view to create.
      Returns:
      An instance of IPrepareView.
    • getWelcomeView

      public IWelcomeView getWelcomeView(Skin welcomeView)
      Creates and returns an instance of IWelcomeView based on the specified skin.
      Overrides:
      getWelcomeView in class AbstractFactory
      Parameters:
      welcomeView - The skin enumeration that determines which welcome view to create.
      Returns:
      An instance of IWelcomeView.
    • getSelectionView

      public ISelectionView getSelectionView(Skin selectionView)
      Creates and returns an instance of ISelectionView based on the specified skin.
      Overrides:
      getSelectionView in class AbstractFactory
      Parameters:
      selectionView - The skin enumeration that determines which selection view to create.
      Returns:
      An instance of ISelectionView.