using System.Collections;
using System.Collections.Generic;
public static void Main()
Dictionary<string, int> testItems = new Dictionary<string, int>();
for (int t = 0; t < testsCount; t++){
List<TestDrop> drops = new List<TestDrop>();
drops.Add(new TestDrop("-------empty", 60f));
drops.Add(new TestDrop("hp", 1.5f));
drops.Add(new TestDrop("ammo", 1f));
drops.Add(new TestDrop("fire up", 0.05f));
drops.Add(new TestDrop("bullet vel", 0.05f));
drops.Add(new TestDrop("clip size", 0.05f));
drops.Add(new TestDrop("cc", 0.05f));
drops.Add(new TestDrop("dmg", 0.05f));
drops.Add(new TestDrop("reload", 0.05f));
drops.Add(new TestDrop("allup", 0.01f));
drops.Add(new TestDrop("cufflink", 0.02f));
drops.Add(new TestDrop("cupon", 0.02f));
drops.Add(new TestDrop("rabit", 0.02f));
drops.Add(new TestDrop("feather", 0.02f));
drops.Add(new TestDrop("horseshoe", 0.02f));
foreach (var a in drops){
Console.WriteLine("Counted prob range: " + probRange);
Console.WriteLine("Fill probrange with missing values: " + (100-probRange));
List<float> rolls = new List<float>();
var rand = new System.Random();
for(int i = 0; i<200;i++){
float a = (float)rand.NextDouble() * probRange;
Dictionary<string, int> result = new Dictionary<string, int>();
result["-------out of prob range"] = 0;
result["-------empty"] = 0;
result["+++Items dropped: "] = 0;
foreach(var roll in rolls){
foreach(var prob in drops){
if ("-------empty" != prob.name)
result["+++Items dropped: "] += 1;
if (result.ContainsKey(prob.name)){
if (testItems.ContainsKey(prob.name)){
testItems[prob.name] += 1;
if (result.ContainsKey("-------out of prob range")){
result["-------out of prob range"] += 1;
result["-------out of prob range"] = 1;
Console.WriteLine("--------------------------------------");
foreach(var r in result){
Console.WriteLine(r.Key + ": " + r.Value);
itemsSum += result["+++Items dropped: "];
Console.WriteLine("--------------------------------------");
Console.WriteLine("Srednia: dropow z " + testsCount + " prob: " + itemsSum / testsCount);
foreach(var td in testItems){
Console.WriteLine("Srednia: " + td.Key + " z " + testsCount + " prob: " + td.Value / testsCount);
public TestDrop(string n, float p){