示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GameLogic"/> class.
 /// This constructor is for testing.
 /// </summary>
 /// <param name="gM">Gamemodel mock</param>
 /// <param name="repo">Repository mock</param>
 public GameLogic(GameModel gM, DataBaseLogic repo)
 {
     this.SoundSystem     = new SoundSystem();
     this.gametime        = new Stopwatch();
     this.gM              = gM;
     random               = new Random();
     this.roundrepository = repo;
     this.gametime.Start();
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GameLogic"/> class.
 /// </summary>
 public GameLogic()
 {
     this.SoundSystem     = new SoundSystem();
     this.gametime        = new Stopwatch();
     this.gM              = new GameModel();
     random               = new Random();
     this.roundrepository = new DataBaseLogic(new Repository());
     this.gametime.Start();
     this.SoundSystem.PlayTADASound();
 }