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(); }
/// <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(); }
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(); }