コード例 #1
0
        public StartupWindowViewModel(IGalaxyGeneratorService galaxyGeneratorService)
        {
            this.GeneratorService = galaxyGeneratorService;

            this.NewGameCommand = new RelayCommand(this.NewGame);
            this.ExitCommand    = new RelayCommand(this.Exit);
        }
コード例 #2
0
        public void Setup()
        {
            this.planetGeneratorService = new Mock <IPlanetGeneratorService>();
            this.planetGeneratorService.Setup(s => s.PopulatePlanetStats(It.IsAny <Planet>()));

            this.galaxyGeneratorService = new GalaxyGeneratorService(new RngService(), this.planetGeneratorService.Object);
        }