/* * Requires client to create game instance with view data (interfaces) and * board data (difficulty), then call BeginGame() to begin. */ public Game( IGameView view, BoardData boardData, int boardSeed) { // Constuct a new board with the game data board = new Board.Board( boardData, this, boardSeed); // Create the game time component _time = new GameTime(this); // Set state view state = GameState.Waiting; _view = view; // Tell the view we're ready 2 rumble _view.OnGameSet(GetGameConfigurationData(boardData, board)); }
//====== ctors public GameTime(IGameTimeSource gameTimeSource) { this.gameTimeSource = Verify.NotNull(gameTimeSource, nameof(gameTimeSource)); }