Learning Rust, Day 2
April 3, 2020•355 words
I was able to make minor progress on the Cribbage game. It's been a few weeks since I had looked at it - turns out a global pandemic can be distracting. The code I left is just series of enums and a Card struct.
The goal for this round was simple: build an all function that returns all 52 cards and print the result. So, as a list:
Be able to informatively print a Card struct
Iterate across all ranks and suits to build a list of Card structs (we basically want the Cartesian product)
Write a te...
Read post