ILocation CreateLocation(NewGameParams param) { var locationParam = new LocationParams() { Height = param.MapHeight, Width = param.MapWidth, PlayerNumber = param.PlayerNumber }; return(_serviceContainer.GetService <ILocationManager>().CreateLocation(locationParam)); }
static void Main(string[] args) { var gameParams = new NewGameParams() { MapHeight = 10, MapWidth = 20, PlayerNumber = 1 }; var ui = new UIDrawing(); using (IGameManager gameManager = new GameManager(ui)) { ICurrentGame game = gameManager.NewGame(gameParams); game.Start(); } }
public ICurrentGame NewGame(NewGameParams param) { var location = this.CreateLocation(param); return(new CurrentGame(_currentUI, location, param.Steps)); }