当前位置: 首页>>代码示例>>C#>>正文


C# Engine.Run方法代码示例

本文整理汇总了C#中Engine.Run方法的典型用法代码示例。如果您正苦于以下问题:C# Engine.Run方法的具体用法?C# Engine.Run怎么用?C# Engine.Run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Engine的用法示例。


在下文中一共展示了Engine.Run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GameTest2

        public void GameTest2()
        {
            Console.SetIn(new StringReader(
            @"9
            8 8"));

            int expected = 1;

            int size = UserInterface.ReadSize();

            Field field = new Field(size, size);
            field[8, 8] = "1";

            Engine engine = new Engine(field);

            engine.OnGameOver += (obj, numberOfMoves) =>
            {
                Assert.AreEqual(Field.Detonated, field[8, 8]);
                Assert.AreEqual(Field.Detonated, field[7, 7]);

                Assert.AreEqual(expected, numberOfMoves);
            };

            engine.Run();
        }
开发者ID:TeamPotassium,项目名称:BattleField,代码行数:25,代码来源:GameTests.cs

示例2: Main

 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Engine game = new Engine())
     {
         game.Run();
     }
 }
开发者ID:shubham3063,项目名称:Modified-Snakes-Ladder-Game,代码行数:10,代码来源:Program.cs

示例3: Main

 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Engine engine = new Engine(new GameStartup()))
     {
         engine.Run();
     }
 }
开发者ID:JacobNorlin,项目名称:project-duck,代码行数:10,代码来源:Program.cs

示例4: Main

        private static void Main()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            var e = new Engine();
            e.Run();
        }
开发者ID:StanislavGeorgieff,项目名称:IssueTrackerWebApp,代码行数:7,代码来源:Program.cs

示例5: Main

 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Engine engine = new Engine())
     {
         engine.Run();
     }
 }
开发者ID:TeamAmpere,项目名称:AdvancedC-Game,代码行数:10,代码来源:SpaceWarsMain.cs

示例6: Main

    /// <summary>
    /// This is the main method of the application. Here we create the User interface and the game engine objects
    /// After that the game engine is initialized and launched
    /// </summary>
    private static void Main()
    {
        IUserInterface consoleInterface = new ConsoleInterface();
        Engine gameEngine = new Engine(consoleInterface);

        gameEngine.InitializeEngine();
        gameEngine.Run();
    }
开发者ID:smo82,项目名称:Americium,代码行数:12,代码来源:HangmanMain.cs

示例7: Main

        static void Main()
        {
            IReader reader = new ConsoleReader();
            IWriter writer = new ConsoleWriter();

            var engine = new Engine(reader, writer);
            engine.Run();
        }
开发者ID:hristodobrev,项目名称:Software-University,代码行数:8,代码来源:Program.cs

示例8: Main

        static void Main(string[] args)
        {
            var io = new ConsoleUserInterface();
            var db = new Database();

            var engine = new Engine(io, db);
            engine.Run();
        }
开发者ID:veronika793,项目名称:Software-University-Courses,代码行数:8,代码来源:EmpiresApp.cs

示例9: Main

        private static void Main()
        {
            System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();
            customCulture.NumberFormat.NumberDecimalSeparator = ".";
            System.Threading.Thread.CurrentThread.CurrentCulture = customCulture;

            var engine = new Engine();
            engine.Run();
        }
开发者ID:StanislavGeorgieff,项目名称:Vehicle-park-system,代码行数:9,代码来源:VehicleParkSystemProgramm.cs

示例10: Main

        public static void Main()
        {
            IReader consoleReader = new ConsoleReader();
            IWriter consoleWriter = new ConsoleWriter();
            IPerformanceDatabase database = new PerformanceDatabase();
            IEngine engine = new Engine(consoleReader, consoleWriter, database);

            engine.Run();
        }
开发者ID:zhecho1215,项目名称:Softuni,代码行数:9,代码来源:EntryPoint.cs

示例11: Main

 private static void Main()
 {
     Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
     var database = new IssueTrackerDatabase();
     var issueTracker = new IssueTracker(database);
     var dispatcher = new Dispatcher(issueTracker);
     var engine = new Engine(dispatcher);
     engine.Run();
 }
开发者ID:EBojilova,项目名称:CSharpHQC,代码行数:9,代码来源:Program.cs

示例12: Main

        public static void Main()
        {
            var database = new PerformanceDatabase();
            var reader = new ConsoleInputReader();
            var writer = new ConsoleOutputWriter();

            var engine = new Engine(database, reader, writer);
            engine.Run();
        }
开发者ID:Nezhdetov,项目名称:Software-University,代码行数:9,代码来源:TheatreMain.cs

示例13: Main

        private static void Main()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            ICommandExecutor commandExecutor = new CommandExecuter();
            IUserInterface userInterface = new ConsoleInterface();

            var engine = new Engine(commandExecutor, userInterface);
            engine.Run();
        }
开发者ID:exploitx3,项目名称:HighQualityCode,代码行数:10,代码来源:VehicleParkMain.cs

示例14: Main

        // BUG: Fix bug in test 5.
        public static void Main()
        {
            ITestingSystemDatabase database = new ACDatabase();
            IController controller = new Controller(database);
            ICommandManager commandManager = new CommandManager(controller);
            IUserInterface ui = new ConsoleUserInterface();

            IEngine engine = new Engine(ui, commandManager);
            engine.Run();
        }
开发者ID:msmilkoff,项目名称:HighQualityCodeHomeworks,代码行数:11,代码来源:ACTestingSystemMain.cs

示例15: Main

        static void Main()
        {
            EngineBootstrapper boostrapper = new EngineBootstrapper();
            boostrapper.Run();

            using (Engine engine = new Engine(boostrapper.Kernel))
            {
                engine.Run();
            }
        }
开发者ID:nydehi,项目名称:openuo,代码行数:10,代码来源:Program.cs


注:本文中的Engine.Run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。