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.
The kata's testing code incorrectly assumes that there is only 1 possible row/column/diagonal sum for every magic square of a certain size. In fact this is already untrue for
4x4
magic squares.Its calculation is also flawed: adding a constant to all numbers will result in the "expected sum" to change by a different amount. Any minimum value other than
0
will cause the sum test to fail.This kata cannot be solved:
Seems like it does not work... at least.. for valid 3x3 square i got response:
The sum in row 0 is incorrect.: expected 15 to equal 13.5
This comment is hidden because it contains spoiler information about the solution