本文整理汇总了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();
}
示例2: Main
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
using (Engine game = new Engine())
{
game.Run();
}
}
示例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();
}
}
示例4: Main
private static void Main()
{
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
var e = new Engine();
e.Run();
}
示例5: Main
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
using (Engine engine = new Engine())
{
engine.Run();
}
}
示例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();
}
示例7: Main
static void Main()
{
IReader reader = new ConsoleReader();
IWriter writer = new ConsoleWriter();
var engine = new Engine(reader, writer);
engine.Run();
}
示例8: Main
static void Main(string[] args)
{
var io = new ConsoleUserInterface();
var db = new Database();
var engine = new Engine(io, db);
engine.Run();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例15: Main
static void Main()
{
EngineBootstrapper boostrapper = new EngineBootstrapper();
boostrapper.Run();
using (Engine engine = new Engine(boostrapper.Kernel))
{
engine.Run();
}
}