コード例 #1
0
ファイル: Facade.cs プロジェクト: Fatme/King-Survival-4
        public void Start(IRenderer renderer, IInputProvider provider)
        {
            renderer.RenderMainMenu();
            IWinningConditions winningConditions = new WinningConditions();
            var players = new List<IPlayer>();
            var kingPlayer = new Player("king");
            var pawnPlayer = new Player("pawn");
            players.Add(kingPlayer);
            players.Add(pawnPlayer);

            var board = new Board.Board();

            var engine = new KingSurvivalEngine(renderer, provider, board, winningConditions, players);
            engine.InitializeGame().StartGame();
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: kskondov/King-Survival-4
 /// <summary>
 /// Method for starting a game
 /// </summary>
 /// <param name="renderer">The renderer on which the info is going to be rendered</param>
 /// <param name="provider">The input provider that provides information</param>
 public void Start(IRenderer renderer, IInputProvider provider)
 {
     renderer.RenderMainMenu();
     IWinningConditions winningConditions = new WinningConditions();
     var players = new List<IPlayer>();
     var kingPlayer = new Player(provider.GetPlayerName());
     var pawnPlayer = new Player(provider.GetPlayerName());
     players.Add(kingPlayer);
     players.Add(pawnPlayer);
     var board = new Board.Board();
     var memory = new BoardMemory();
     var context = new CommandContext(memory, board, players[0]);
     var commandFactory = new CommandFactory();
     var engine = new KingSurvivalEngine(renderer, provider, board, winningConditions, players, memory, context, commandFactory);
     engine.InitializeGame().StartGame();
 }
コード例 #3
0
ファイル: Facade.cs プロジェクト: Fatme/King-Survival-4
        public void Start(IRenderer renderer, IInputProvider provider)
        {
            renderer.RenderMainMenu();
            IWinningConditions winningConditions = new WinningConditions();
            var players    = new List <IPlayer>();
            var kingPlayer = new Player("king");
            var pawnPlayer = new Player("pawn");

            players.Add(kingPlayer);
            players.Add(pawnPlayer);

            var board = new Board.Board();

            var engine = new KingSurvivalEngine(renderer, provider, board, winningConditions, players);

            engine.InitializeGame().StartGame();
        }