public GameConsole() { gameState = new GameState { Running = true }; var rewardsRepo = new RewardRepository(@".\Resources\Dat\rewards.csv"); var achievementsRepo = new AchievementRepository(@".\Resources\Dat\achievements.csv", gameState); var gameItemsRepo = new GameItemRepository(@".\Resources\Dat\gameItems.csv"); var storeInventoryRepo = new StoryInventoryRepository(@".\Resources\Dat\storeInventory.csv"); gateway = new DataGateway(rewardsRepo, gameItemsRepo, achievementsRepo, storeInventoryRepo); commandsGroup = new TopCommandGroupFactory().Build(); gameState.Lobby = new LobbyRoom(gameState, new[] { "Welcome to the Lobby" }, GameMode.Lobby, commandsGroup); gameState.Store = gameState.Store ?? new MinerStoreFactory(gameState, commandsGroup, gateway).Build(); gameState.ControlRoom = new ControlRoomFactory(gameState, commandsGroup).Build(); gameState.ClaimsOffice = new ClaimsOfficeRoomFactory(gameState, commandsGroup, gateway).Build(); gameState.SaveDirectory = @"c:\chipMiner\saves"; gameState.GameTime.Start(); IsVisible = true; IsFocused = true; StartGame(); hud = new HudConsole(gameState) { Position = new Point(0, 0) }; input = new InputConsole(this, gameState) { Position = new Point(1, 34) }; output = new OutputConsole(this, 83) { Position = new Point(1, 1) }; events = new GameEventsConsole(this, 83) { Position = new Point(85, 1) }; Children.Add(hud); Children.Add(input); Children.Add(output); Children.Add(events); Global.FocusedConsoles.Set(input); }
public StoryInventoryRepositoryTests() { repository = new StoryInventoryRepository(@"RepositoryTests\Resources\basic-storeInventory.csv"); }