public DiceController() { // Create dice model this.diceModel = new DiceModel(); // Create dice UI and inject controller (= this) // Injection is necessary in order for the UI to notify something has happened this.diceUI = new DiceUI(this); // Create new random generator using seed (for absolute random generation) this.randomGenerator = new Random(Guid.NewGuid().GetHashCode()); }
public DiceController() { model = new DiceModel(this); view = new DiceView(this); }