Down the Oregon Trail with Functional C# – Simon Painter – NDC Melbourne 2022

In 1971, three students from Minnesota thought they could liven up a history lecture by creating a computer game for the students to play, and after several days of work in HP Time Share BASIC, they came up with what turned out to be a significant milestone in the history of computer games – Oregon Trail.

Oregon Trail is often regarded as one of the first great computer games, as well as being the originator of a franchise that is still running to this day. It was effectively also one of the first instances of both Shareware and a Commercial home release of(depending on the version).

My interest though, isn’t just in historical computer games, it’s also .NET and Functional Programming. I want to use this as a worked example of one of my passions – Functional Programming in C#! The challenge I’ve set myself is to redevelop Oregon Trail into C# using the following restrictions:

* Near 100% unit test coverage
* No variables can change state once set
* No statements (for, foreach, if, where, etc.) unless there literally is no way of avoiding them

I’ll also be demonstrating a few of the tricks Functional Programming can offer, like Higher-order functions, functional flows with simple Monads and Tail Recursion. There should also be a bit of retro computing fun, while we’re at it.

Check out more of our featured speakers and talks at


  1. Thanks for the lecture. Interesting and entertaining. I’m in the same situation where I would love to use F# at work but it’s a C# only environment so I’ve been writing as functional as possible as C# allows (which is quite a bit, especially using the LanguageExt library).

    Also you can use Console.Beep(frequency, duration) if you want to add basic sound your Oregon Trail victory condition 😆

  2. Hi, folks. I'm the silly person that gave this talk in Melbourne a few months ago. I'll be trying to keep an eye on this comments thread as often as time allows, in case anyone has any questions or feedback. I'm happy to receive criticism, but please do keep it polite.

Leave a Reply

© 2023 53GB