Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It's unfortunate that the inputs are stringified. Rust has such a nice, rich type system, why not use it? Resources are a perfect fit for enums, with variants being tuples with their respective counts for example.
The idea is good, but it could be even spicier if there wasn't simply a 1:1 trading ratio per resource.
That said, my only real "issue" with the kata is that the tests don't have proper assertion messages. Rust's test framework is designed with the assumption that the code author can see tests and thus knows what "right" and "left" refer to. On codewars, this isn't the case, and it needs to be clarified.