コード例 #1
0
        public static GameRoot CreateGameRoot(
            IInputDevice inputDevice,
            IDisplayDevice displayDevice,
            IAudioDevice audioDevice,
            IHiScoresStorage hiScoresStorage,
            ILogger logger)
        {
            Verify.NotNull(inputDevice, nameof(inputDevice));
            Verify.NotNull(displayDevice, nameof(displayDevice));
            Verify.NotNull(audioDevice, nameof(audioDevice));
            Verify.NotNull(hiScoresStorage, nameof(hiScoresStorage));
            Verify.NotNull(logger, nameof(logger));

            var hal = new HardwareAccessLayer(inputDevice, displayDevice, audioDevice);

            var sleeper = new Sleeper();

            var gameRoot = new GameRoot(hal, sleeper, logger);

            return(gameRoot);
        }
コード例 #2
0
        //====== ctors

        public HiScoresManager(IHiScoresStorage hiScoresStorage)
        {
            this.hiScoresStorage = Verify.NotNull(hiScoresStorage, nameof(hiScoresStorage));
        }