private static RandomData _CreateAdjustPlayerPhaseRandom() { var data = new RandomData { RandomType = RandomData.RULE.ADJUSTMENT_PLAYER_PHASE, Randoms = new List<IRandom>() }; data.Randoms.Add(Random.Instance); data.Randoms.Add(Random.Instance); return data; }
private static RandomData _CreateTreasureRandom() { var data = new RandomData { RandomType = RandomData.RULE.CHECK_TREASURE, Randoms = new List<IRandom>() }; data.Randoms.Add(Random.Instance); data.Randoms.Add(Random.Instance); return data; }
private static RandomData _CreateDeathRandom() { var data = new RandomData { RandomType = RandomData.RULE.DEATH, Randoms = new List<IRandom>() }; data.Randoms.Add(Random.Instance); data.Randoms.Add(Random.Instance); return data; }
private RandomData _CreateAdjustPlayerPhaseRandom() { var data = new RandomData { RandomType = RandomData.RULE.ADJUSTMENT_PLAYER_PHASE, Randoms = new List<IRandom>() }; var r = Substitute.For<IRandom>(); r.NextInt(0, 1000).Returns(1000); data.Randoms.Add(r); return data; }
private RandomData _CreateTreasureRandom() { var data = new RandomData { RandomType = RandomData.RULE.CHECK_TREASURE, Randoms = new List<IRandom>() }; var r = Substitute.For<IRandom>(); r.NextInt(0, 0x10000000).Returns(0x10000000); data.Randoms.Add(r); r = Substitute.For<IRandom>(); r.NextFloat(0, 1).Returns(1); data.Randoms.Add(r); return data; }
private RandomData _CreateOddsRandom() { var data = new RandomData { RandomType = RandomData.RULE.ODDS, Randoms = new List<IRandom>() }; var r = Substitute.For<IRandom>(); r.NextInt(0, 1000).Returns(1000); data.Randoms.Add(r); r = Substitute.For<IRandom>(); r.NextInt(0, 1000).Returns(1000); data.Randoms.Add(r); r = Substitute.For<IRandom>(); r.NextInt(0, 1000).Returns(1000); data.Randoms.Add(r); r = Substitute.For<IRandom>(); r.NextInt(0, 1000).Returns(1000); data.Randoms.Add(r); r = Substitute.For<IRandom>(); r.NextInt(0, 1000).Returns(1000); data.Randoms.Add(r); return data; }
private RandomData _CreateDeathRandom() { var data = new RandomData { RandomType = RandomData.RULE.DEATH, Randoms = new List<IRandom>() }; var r = Substitute.For<IRandom>(); r.NextInt(0, 0x10000000).Returns(0x10000000); data.Randoms.Add(r); r = Substitute.For<IRandom>(); r.NextInt(0, 0x10000000).Returns(0x10000000); data.Randoms.Add(r); return data; }
public IRandom FindIRandom(RandomData.RULE rule_type, int index) { return CreateRandom.GetRandoms() .Find(x => x.RandomType == rule_type) .Randoms.ElementAt(index); }