private void button1_Click(object sender, RoutedEventArgs e) { GameService gameService = new GameService(Convert.ToInt32(this.mapHeight.Text), Convert.ToInt32(this.mapWidth.Text), this.playerName.Text); if(startGamePressed != null) startGamePressed(this, new StartGameEventArgs(gameService)); }
public GameManager(MapView mapView, GameService service, ListBoxLogger listBoxLogger) { this.gameService = service; this.window = mapView; this.keyProcessor = new MainKeyProcessor(this); //MapLoader loader = new MapLoader(); //char[,] initialMap = loader.loadMap("TestMap.map"); AbstractLogger.Current = listBoxLogger; //this.gameService.InitializeGame(initialMap); this.mapDrawer = new MapDrawer(window.GridMap, 15, 20, this.gameService.Map); UpdateScreenMap(); UpdateGui(); }
public MapView(GlobalGameModel gameModel, GameService service) { InitializeComponent(); this.gameModel = gameModel; gameManager = new GameManager(this, service, new ListBoxLogger(Logger) ); }
public StartGameEventArgs(GameService gameService) { this.gameService = gameService; }