Skip to content

Instantly share code, notes, and snippets.

@isidore
Created July 30, 2016 10:34
Show Gist options
  • Save isidore/e821db16b14ce5514986939038070b35 to your computer and use it in GitHub Desktop.
Save isidore/e821db16b14ce5514986939038070b35 to your computer and use it in GitHub Desktop.
private IEnumerable<string> ProcessScores()
{
yield return Win();
yield return Advantage();
yield return ScoreNormal();
yield return person2.ScoreOpponentHasntScored(person1);
yield return person1.ScoreOpponentHasntScored(person2);
yield return ScoreTie();
throw new Exception("Unreachable code was executed");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment