コード例 #1
0
ファイル: Program.cs プロジェクト: mgatkins/Battleships
        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
ファイル: Program.cs プロジェクト: MatthewDKemp/Battleships
        static void Main(string[] args)
        {
            ShipEngine e = new ShipEngine();

            e.Run();
        }