public void Eat(Fish f) { this.Energy += 500; Earn.Invoke($"Вы скушали рыбку, прибавилось {f.Energy} энергии, всего осталось {this.Energy}", i++); if (this.Energy > maxEnergy) { Plenty.Invoke("Кошка заболела из-за избытка энергии"); } }
public void NormalizeSetTest() { int[] firstVector = { 0, 1, 1, 2, 3 }; Plenty first = new Plenty(firstVector); int[] secondVector = { 0, 1, 2, 3 }; Plenty res = new Plenty(secondVector); Assert.AreEqual(first, res); }
public void PlentyTestOperatorMinusInt() { int[] firstVector = { 0, 1, 2, 3 }; Plenty first = new Plenty(firstVector); int num = 3; var tmp = first - num; int[] resArray = { 0, 1, 2 }; Plenty res = new Plenty(resArray); Assert.AreEqual(tmp, res); }
public void PlentyTestOperatorMinus() { int[] firstVector = { 0, 1, 2, 3 }; int[] secondVector = { 1, 2, 4, 5 }; Plenty first = new Plenty(firstVector); Plenty second = new Plenty(secondVector); var tmp = first - second; int[] resArray = { 0, 3, 4, 5 }; Plenty res = new Plenty(resArray); Assert.AreEqual(tmp, res); }