/// <summary> /// The main method of the program. /// </summary> public static void Main() { IInputProvider inputProvider = new ConsoleInputProvider(); ConsoleRenderer renderer = new ConsoleRenderer(); ICellDamageHandler damageHandler = new DefaultDamageHandler(); ConsoleGame consoleGame = new ConsoleGame(inputProvider, renderer, damageHandler); consoleGame.Start(); }
/// <summary> /// Initializes a new instance of the <see cref="GameWindow" /> class /// </summary> /// <param name="fieldSize">The size of the game field</param> /// <param name="isExplosionChained">Used to determine if explosions will chain</param> public GameWindow(int fieldSize, bool isExplosionChained) { this.InitializeComponent(); ICellDamageHandler damageHandler = new DefaultDamageHandler(); var renderer = new WpfRenderer(this); var engine = new Engine(renderer, damageHandler); this.engine = engine; var field = new GameField(fieldSize, isExplosionChained); this.engine.Init(field); }