Reasoning in Games: Players as Programs