Hello there! I'm developing a "4x" game a-la Master of Orion. I was coding some algorithms to help me generate a somewhat realistic galaxy. I'd like to know if it is possible to compute the time that a main sequence star will spend in its subgiant and giant status. For example, given the mass I can determine all other values (luminosity, effective temperature, lifespan, etc), but I'd like to know those values. In fact in the game, each star is given a random "age" in billion years. Depending on this value, I can "evolve" the star off-the main sequence. But depending on how many years have passed the star could have become a sub giant, a giant, a white dwarf, a neutron star or a black hole. Another question I had, what would be the best way to determine the average temperature on a planet, given its orbital radius and the star's luminosity? I've read about blackbodies, but as I've understood, not all planets would be perfect blackbodies, so the absorbtion factor would need to be corrected. But what approaches do you think I could follow when talking about fictional planets? Is this corrected value necessary or a good approximation can still be found without it? Thanks for the answers :) More info about the game I'm developing can be found here.