예제 #1
0
        public void RandomDoubleTest()
        {
            double expected = 0F; // TODO: 初始化为适当的值
            double actual;

            actual = RandomEx.RandomDouble();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override bool IsDrop()
 {
     if (RandomEx.RandomDouble() * 100 < base.Probability * OneTreasure.DropGoldMultiplier)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public virtual bool IsDrop()
 {
     if (RandomEx.RandomDouble() * 100 < m_fProbability * OneTreasure.DropMultiplier)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }