Example #1
0
        /// <summary>
        /// Game states: the game consistes of 4 main states :
        /// -Start : to get the answer if the player wants to play or not.
        /// -GameDescription : Display How to paly to the player.
        /// -NewGame : the player choose the mase size and the game started by building the maze
        /// -InProgress : the player presses the arrows till he wins / lose the game
        /// </summary>

        public Game(IMazeIntegration mazeIntegration, IRender render, IInput input)
        {
            _mazeIntegration = mazeIntegration;
            _render          = render;
            _input           = input;
            _play            = new Play();
            _currentState    = State.Start;
        }
Example #2
0
        public GameUI(IMazeIntegration mazeIntegration, IHandleInput handleInput, ILoadMaze loadMaze,
                      IRenderMaze renderMaze, ILoadPlayer loadPlayer, IExecuteUserAction executeUserAction)
        {
            _mazeIntegration   = mazeIntegration;
            _handleInput       = handleInput;
            _loadMaze          = loadMaze;
            _renderMaze        = renderMaze;
            _loadPlayer        = loadPlayer;
            _executeUserAction = executeUserAction;

            InitializeSettings();
            PlayGame();

            Console.WriteLine(Constants.PlayerConstants.EOG);
            Console.ReadKey();
        }
Example #3
0
 public GameClient(IMazeIntegration service)
 {
     MazeService = service;
 }
Example #4
0
 public MazeEmulator(IMazeIntegration mazeIntegration)
 {
     _mazeIntegration = mazeIntegration;
     _mazeLayout      = new MazeLayout();
 }
Example #5
0
 public ExecuteUserActionService(ILoadPlayer loadPlayer, IMazeIntegration mazeIntegration, ILoadMaze loadMaze)
 {
     _loadPlayer      = loadPlayer;
     _mazeIntegration = mazeIntegration;
     _loadMaze        = loadMaze;
 }