本文整理汇总了C#中IGame.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# IGame.Initialize方法的具体用法?C# IGame.Initialize怎么用?C# IGame.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGame
的用法示例。
在下文中一共展示了IGame.Initialize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GameOfLifeRunner
public GameOfLifeRunner(IGame game, IConsoleFormatter formatter)
{
_game = game;
_formatter = formatter;
var seed = generateRandomBoard();
_game.Initialize(BOARD_SIZE, seed);
_formatter.Initialize(BOARD_SIZE);
}
示例2: GameControl
public GameControl()
{
InitializeComponent();
this.MouseLeave += MouseFixed.MouseLeave;
this.MouseLeftButtonDown += MouseFixed.LeftButtonDown;
this.MouseLeftButtonUp += MouseFixed.LeftButtonUp;
game = ServiceLocator.Resolve<IGame>();
game.Initialize();
this.Width = game.Width;
this.Height = game.Height;
screen.Source = game.Screen;
}
示例3: Integrate
internal static void Integrate(string[] args, IUI ui, IGame game)
{
ui.Started += () =>
{
var boardDefinition = File.ReadAllText(args[0]);
var board = Board.Parse(boardDefinition);
game.Initialize(board);
};
game.Initialized += ui.Board_prepared;
ui.Number_of_players_entered += game.Set_players;
ui.Rolled_the_dice += game.Move_player;
game.Player_moved += ui.Update_player_position;
game.Game_over += ui.Game_over;
}