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.
noItemsJustMoreTimesDeclared
andsomeNoValuesAsWellAsSomeHaveValuesAssigned
are expecting incorrect resultsSome possible improvements
More comments in spoilered comment below:
Coding style and practices:
items
should be passed as aconst
reference to the user solution,EqualsWithDelta
matcher, there is no need to calculate the tolerance by yourself.vector
of a fixed size of 3? What's wrong with making them a dedicated structure, or at least a 3-tuple?This comment is hidden because it contains spoiler information about the solution
Description should be language-agnostic.
Particular encodings should be generalised over; for the description, focus on underlying concepts instead of language-specific encodings. Eg, "
std::vector [1,0,1]
" should just be "list of bulb states[true,false,true]
".Note: a bulb state is not
0
or1
, it'son
oroff
, so it should be encoded as an Enum, or maybe a Boolean. If your language doesn't have Enums or Booleans, specify the encoding in the initial solution or a language-specific block. Use appropriate datatypes!it is likely that this is a duplicate. you should check