コード例 #1
0
ファイル: Game.cs プロジェクト: SherryRasmy/MazeGame
        /// <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;
        }
コード例 #2
0
ファイル: GameUI.cs プロジェクト: indrefi/Maze-Console-Game
        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();
        }
コード例 #3
0
ファイル: GameClient.cs プロジェクト: eramax/MazeGame
 public GameClient(IMazeIntegration service)
 {
     MazeService = service;
 }
コード例 #4
0
ファイル: MazeEmulator.cs プロジェクト: Qualmeru/TreasureHunt
 public MazeEmulator(IMazeIntegration mazeIntegration)
 {
     _mazeIntegration = mazeIntegration;
     _mazeLayout      = new MazeLayout();
 }
コード例 #5
0
 public ExecuteUserActionService(ILoadPlayer loadPlayer, IMazeIntegration mazeIntegration, ILoadMaze loadMaze)
 {
     _loadPlayer      = loadPlayer;
     _mazeIntegration = mazeIntegration;
     _loadMaze        = loadMaze;
 }