If you'd like to try learning by doing, sort of, the 2009 ICFP Contest had you write code to control a spacecraft performing several tasks: http://www.ittc.ku.edu/icfp-contest/
I enjoyed it, though I don't think I got past the first couple of missions. Can anyone recommend another game? There's Kerbal Space Program, which I haven't tried but was said to stick to Kepler orbits, not like the numerically-integrated gravity of the above simulation.
KSP is really good for exploring gravity assists, actually – they work just the same way in the Keplerian 'patched conics' approximation as in real life. For Newtonian physics, there's Orbiter, which is much more of a simulation than a game; it puts you in our own Solar System, for one thing.
you are correct that ksp orbits are kepler, no playing with things like lagrange points.
with that said you can do some cool stuff, especially when you get into exploring the available mods. kOS might be of interest to you - it adds the ability to write programs to control your creations.
I enjoyed it, though I don't think I got past the first couple of missions. Can anyone recommend another game? There's Kerbal Space Program, which I haven't tried but was said to stick to Kepler orbits, not like the numerically-integrated gravity of the above simulation.