public void SetClockForOneMinute_FireGameClockTick_ShouldBe59Seconds() { //Arrange var startingTime = new GameTime() { Minutes = 1 }; clockController.SetGameTime(startingTime); //Act clockController.DecrementGameTimeByTenth(); var time = clockController.GetGameTime(); //Assert Assert.AreEqual(0, time.Minutes); Assert.AreEqual(59, time.Seconds); Assert.AreEqual(9, time.Tenths); }
private void BtnClock_Click(object sender, EventArgs e) { var gametime = ClockController.GetGameTime(); if (gametime.Minutes > 0 || gametime.Seconds > 0 || gametime.Tenths > 0) { GameClockTimer.Enabled = !GameClockTimer.Enabled; } else { GameClockTimer.Enabled = false; } }