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); }
//====== ctors public HiScoresManager(IHiScoresStorage hiScoresStorage) { this.hiScoresStorage = Verify.NotNull(hiScoresStorage, nameof(hiScoresStorage)); }