// Zetzi reckons, in a situation where all players in a group receive identical amounts of experience, that a lower level player will never catch up.
// I disagree...... and here's the numbers to prove it. =)
/* This emulator cannot output more than 45 Levels worth in one run, so I had to condense the calculation to show the effect more drastically.
Were this able to run longer, you'd see that - with a great enough period of time - the level difference would eventually hit and stabilise on 0. */
// Code follows, output goes to console at bottom of page.
using System;
public class Program
{
public static void Main()
// Variables - can ignore.
int p1Lvl = 0;
int p2Lvl = 0;
int p1Xp = 0;
int p2Xp = 0;
int conXpAmt = 2;
// Start a loop that runs until P2's Level = 45 (cannot go higher due to output restriction).
while (p2Lvl != 45)
// XP required for P1's next lvl - P1 Lvl * (2 P1 Lvl).
int xpReq = p1Lvl * (conXpAmt + p1Lvl);
// Add 1 XP for P1.
p1Xp++;
// If P1's XP is greater than needed for next level.
if (p1Xp >= xpReq)
// P1 Lvl up.
p1Lvl++;
}
// If P1's lvl is > 10 (to allow P2 to 'fall behind').
if (p1Lvl >= 10)
// XP required for P2's next Lvl - same as above.
xpReq = p2Lvl * (conXpAmt + p2Lvl);
// Add 1 XP for P2.
p2Xp++;
// If P2's XP is greater than needed for next level.
if (p2Xp >= xpReq)
// P2 Lvl up.
p2Lvl++;
// Print P1 and P2's current level to console below.
Console.WriteLine(p1Lvl + "\n" + p2Lvl);
// Calculate the level difference between them and print to console.
Console.WriteLine("Difference between levels = " + (p1Lvl - p2Lvl) + "\n");