예제 #1
0
        ILocation CreateLocation(NewGameParams param)
        {
            var locationParam = new LocationParams()
            {
                Height       = param.MapHeight,
                Width        = param.MapWidth,
                PlayerNumber = param.PlayerNumber
            };

            return(_serviceContainer.GetService <ILocationManager>().CreateLocation(locationParam));
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
        public ICurrentGame NewGame(NewGameParams param)
        {
            var location = this.CreateLocation(param);

            return(new CurrentGame(_currentUI, location, param.Steps));
        }