Down the Oregon Trail with Functional C#
summary
Reimplements the 1975 Oregon Trail BASIC source in modern C#, producing a playable, testable clone that preserves original flow and random events. Uses dependency injection for console and time, injectible RNG, C# record types and emulated discriminated unions, and a simple monad pipeline to transform immutable game state. Addresses recursion limits with trampolined recursion, enforces no mutable variables, and achieves near 100% unit test coverage while conceding a few UI compromises (no bell or per-character output).
AI-written summary · about
chapters (9)
- 0:00Introduction
- 6:07Functional programming
- 13:44BASIC and early games
- 20:02Testable functional C#
- 29:36Player inventory in Oregon Trail
- 36:22Game state with monads
- 43:01Vintage game challenges
- 46:31Future functional projects
- 49:00Q&A
related talks
31mThe Tricks of Game Programming in a Pure Functional Language
01h 05mDDD, event sourcing and CQRS – theory and practice
25mPure Functions & Paladins Building TTRPGS with F# and MVU (v1)
47mHighway to Elm
52mGo Fully Functional and Take Your Legacy Code with You!
01h 01mMoving IO to the edges of your app: Functional Core, Imperative Shell
28mPure Functions & Paladins Building TTRPGS with F# and MVU
45mBack to Front and Beyond
