Using some tricks will be effective for most users.
- Use fake variables
- Use temp modified variables
Sample:
public int[] XValue = new int[200];
public int CValue = 0;
These variables keep coins. CValue is real variable.
When coins increase use ApplyCoins method.
public void ApplyCoins(int pCoins)
{
CValue += pCoins * 8;
for (int i = 0; i < 200; i++)
XValue[i] = CValue;
for (int i = 50; i < 100; i++)
XValue[i] = CValue / 8;
}
Get the real coins value.
public int GetCoins()
{
return CValue / 8;
}
When user search the coins value lots of fake variables will be listed.
This is not best way for prevent hacking but most of user will be eliminated.