8

Miner Key chances

So I really love to mine blocks and get the loot but I realized it is to hard to get one. From what I understood your program just generates 2 numbers every time a player breaks a block and if the numbers are the same, it will give the player a minerkey and if not it will do nothing. I suggest to make a program that every few blocks you mine the chances will be better. I made a program in C# (this is the language I know, you can use it as a base to your program language if you want).

I will send the program, explain what does it do below and then the one problem I do not know how to solve.

The program:
int Chance = 10001;
int BlocksMined = 0;
int GetAMinerKeyChance = 1;
int Counter = 1;
int Guess = 0;
Random Number = new Random();
for (Guess = 0; Guess != 1; Guess = Guess)
{
int NumberOne = Number.Next(Counter, Chance);
int NumberTwo = Number.Next(Counter, Chance);
if (NumberOne == NumberTwo)
{
Guess++;
}
if (NumberOne != NumberTwo)
{
BlocksMined++;
}
if (BlocksMined == 1000)
{
Counter++;
BlocksMined = 0;
}
Console.WriteLine("The Chances: " + Counter + " / " + (Chance - 1) + " ||| The NumberOne was: " + NumberOne + " While the NumberTwo was: " + NumberTwo);
Console.WriteLine("Mined: " + BlocksMined + " Blocks");
Console.WriteLine("------------");
}
BlocksMined = 0;
Counter = 1;
Guess = 0;
Console.WriteLine("You got a miner key!");

Explanation:
The program generates two numbers every time the player mines a block. The Numbers are between 1-10000 at the beginning. If they numbers match, it will give the player a miner key. If they are not, it will just add 1 block to the broken blocks counter. After 1000 broken blocks and no miner key, the chances will improve by one and will be: 2-10000. It will happen over and over again until the player is guaranteed to get a miner key because the only numbers left will be 10000-10000. After the player gets a miner key, the broken blocks counter, the numbers range, everything will reset. The program made to make it easier to get a miner key and makes you a satisfaction.

Problem:
There was one problem I do not know how to solve and it is how to make the program work when you mine blocks only, you can probably add it to the old program and then it will run every time the player breaks a block.

If you want to test it use it in Visual Studio - C# - Console Application and all you have to do it copy it.
If you have any suggestions that will improve the code, message me in discord: xxibmxx#9948, I would like to hear your improvements!

#5399 - Status: rejected

3 years ago by CyanStriker for Improvements

Answer: Rejected

Rejected. Outdated suggestion or not relevant anymore.

3 years ago by NxDs