Skip to content

n1ckdm/rockpaperscissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

🪨📃✂️

This is a small project playing around with a simple Domain Model based around the game Rock Paper Scissors. Inspired by a blog post by Jan Kronquist and a number of excellent talks by Greg Young, but this one in particular.

Why do this?

The aim here was to take the ideas from Greg and implement them in a simple Domain, but with CQRS and Event Sourcing. I was particuarly keen to include the following adjustments given that it's 2022 and we can use some of the nice features of C# 9:

  • Immutable Aggregates (state isn't mutated inside the commands, instead events are returned)
  • Pattern matching to help make the code more DRY and functional
  • C# Record types
  • Implementing a left fold over the Event list to return the current state of an object

What's left to do?

I'm keen to add some additional features to this repo including:

  • An implementation purely in F#
  • Projections as well as a Read Model
  • A process manager and with event handlers (for handling multiple games?)
  • Implementation of a Event Store DB for persistance
  • A multi paradigm implementation with the Domain Model in F# and the Application Layer in C#
  • Write an article on DEV.to about this code
  • Add Lizard and Spock to the move types

About

Implements an simple albeit opinionated Event Sourced, CQRS application for a rock paper scissors game using a DDD approach.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages