Ad
  • Custom User Avatar

    There's still many issues with this, but I think the kata could be OK, so I'll list the problems I found so far:

    • Initial code should compile. Right now it's missing 'export' keyword before types, and you need to account for nullable type in output.
    • The example in description is STILL incorrect. f3 and g2 should be 'b'. I would suggest instead to take the first sample test and put it in description, it's much easier to see what's going on then.
    • expected { Object (before, after) } to deeply equal { Object (before, after) } is not acceptable form of feedback. The fix is very simple and shown below by FArekkusu.
    • You should move board initialization into it blocks before calling assert, so input and expected output is close to each other.
    • Suggestion: add a fixed test with 'w' in outer circle, and all others 'b', then change some middle element. This should be a good confirmation if solution is correct.
    • You NEED random tests. Solve some other katas and click 'Show Kata Test Cases'. In short, you need to generate a random board, compute the expected result, and compare with user's solution.

    Good luck!

  • Custom User Avatar

    No random tests.

  • Custom User Avatar
    assert.deepEqual(
      simpleReversi(board2, [4, 3]), {
        before: ['b', 36],
        after: ['w', 45]
      }
    );
    

    This test is wrong - there're 48 white pieces after the reversal.

  • Custom User Avatar

    The error messages are useless.