Refer to method WutHap
(sorry, I didn't write comments), I need to return both int agg
and int sub to get the method NumGen
would have on int agg
and sub in Main. I know you can use arrays and tuples, but I'm having trouble doing it. If you need any more context, please ask what needs to be clarified. I'm stupid, so saying that it needs more context will probably not lead to actual clarification. Yes, I know the code is abysmal but that isn't the focus.
class Program
{
static void Main(string[] args)
{
int agg = 50;
int sub = 50;
for (int i = 0; i < 100; i++)
{
WutHap(agg, sub);
}
int pop = sub + agg;
Console.WriteLine("Total aggs = " + agg);
Console.WriteLine("Total subs = " + sub);
Console.WriteLine("Total population = " + pop);
Console.ReadKey();
}
static string NumGen()
{
string[] pengs = new string[2]{"agg", "sub"};
Random numGen = new Random();
int mepi = numGen.Next(1, 2);
int mepi2 = numGen.Next(1, 2);
string pemi = pengs[mepi];
string pemi2 = pengs[mepi2];
string whoMet = pemi + ", " + pemi2;
return whoMet;
}
static int WutHap(int agg, int sub)
{
NumGen();
switch (NumGen())
{
case ("agg, agg"):
--agg;
--agg;
break;
case ("agg, sub"):
++agg;
++agg;
++agg;
--sub;
break;
case ("sub, agg"):
--sub;
++agg;
++agg;
++agg;
break;
case ("sub, sub"):
++sub;
++sub;
break;
}
}
}