tresure-chest

This commit is contained in:
Alexander Heldt
2025-11-02 16:11:11 +01:00
parent 64d2de2364
commit 5fb5492306
10 changed files with 261 additions and 0 deletions

13
treasure-chest/HINTS.md Normal file
View File

@@ -0,0 +1,13 @@
# Hints
## 1. Define the TreasureChest generic custom type
- The `TreasureChest` custom type only has a single variant.
## 2. Define the UnlockResult generic custom type
- The `UnlockResult` custom type has 2 variants, `Unlocked`, and `WrongPassword`.
## 3. Define the get_treasure function
- Custom types can be pattern matched on in the same way to access their values.