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.
You're very welcome.
Thank you very much :)
Quite a fancy kata of the ASCII art series, well done.
.
Approved by someone (can you resolve the suggestion?)
This one LGTM! Tried to approve but apparently if the author is active you have to wait a week to approve. If nobody raises any further issues in the discourse (incl. the author themself), I'll approve it in a week's time
No worries, it's fixed. Please review. Also, I'd like to thank you for all the effort and time you put in to help me correct this one, I really appreciate it. If you don't mind, I have another translation from this kata series which I corrected side-by-side with this one so it should be almost ready to approve as well.
All is good now! I just realized I goofed up when I told you to put
no_of_staff
outside. It's meant to be different each time, right? Just put it back in and I'll approve. Sorry, it's totally my badFixed some bugs and made some improvements, ready for review!
Did the above changes. Would note though that the way you initialized the "gen" variable caused the compiler to make a most vexing parse error, but I found a way to corretly initialize.
Looks very good and almost ready to approve. Just correct
< 80
in your reference solution and submission solution to<= 80
and take the engines, distributions,places
,base
,no_of_staff
out of theget_random_staff
function and instead just paste them directly above the function. Recreating them within every call is unnecessary and suboptimal. This might mean you may have to use braces instead of parentheses (so C++ doesn't parse them as function declarations). Also, move theusing
type alias into the private section too, so your type aliases are invisible to the user. Other than this, I have no comments. Looks good! Just rearrange your code into:In the fixed tests, just define the type alias inside the
It
. Try to reduce the scope of your aliases as much as possible.Somehow I didn't save the changes... Nevertheless I changed it again, so please review now
I don't see any of the changes. Are you sure you've clicked publish? Also about where to put functions,
Describe
is just a macro and it's a struct behind the scenes. You can have aprivate
section within it. It's also a good place to put your reference solution too (more info here). Just do this:First of all, thank you for the detailed review. Second of all, I think I fixed all of the above, if you'd be so kind to check :)
Also, I tried to define the get_random_staff inside of the It() block, but it said it couldn't be defined there (I moved it outside of the It but still inside the Describe). Do you know why that is?
Thanks!
Good job! I have a few suggestions:
std::size_t
for the distributions, butno_of_staff
andq
andl
(the nested loop variables) should also bestd::size_t
. Intermixing integer types causes the tests to generate a warning in the log.boredom
andMyboredom
are inconsistent with each other style-wise. Same withBAS
,no_of_staff
, etc. You seem to lean most towards snake case, so maybe turn most things into snake case.#include <fmt/ranges.h>
and use the below template for your assertions. This might mean you have to store thestd::map
s in the fixed tests into variables so you can reference them to generate feedback messages:Loading more items...