Пример #1
0
        static void Main(string[] args)
        {
            IBattleships battleships;

            IFiringStrategy firingStrategy = new CheckerboardFiringStrategy();

            IFleetDeployer fleetDeployer = new DefaultFleetOrders();

            if (Environment.GetEnvironmentVariable("debug") == null)
            {
                battleships = new BattleshipsImpl();
            }
            else
            {
                battleships = new BattleshipsMockImpl();
            }

            ShipEngine e = new ShipEngine(battleships, firingStrategy, fleetDeployer);

            e.Run();
        }
Пример #2
0
        static void Main(string[] args)
        {
            ShipEngine e = new ShipEngine();

            e.Run();
        }