Added purchase function to upgrades.BasicUpgrade. Reduces some repetition
Added getRequirements function to upgrades.BasicUpgrade.