A couple changes for your cost calculator

I added this method to my library as spawnCost.getCost(parts) making these changes. They would be beneficial like this so you can pass the list of parts to it through a function.