Ad
  • Custom User Avatar

    Of course! Thank you.

  • Custom User Avatar

    That's self-inflicted though innit? Because that's the file that you're editing. Fix it yourself or hit the reset button to get back to a compiling state.

  • Custom User Avatar

    I am getting this error:

    TSError: ⨯ Unable to compile TypeScript:
    test.ts:3:23 - error TS2306: File '/workspace/default/solution.ts' is not a module.

    3 import { quine } from "./solution";

  • Custom User Avatar

    No need to rush, take as long as you need, the kata won't disappear :P Meanwhile, you should consider unpublishing it, as for some users it's automatic downvote when there's no random tests. It's better to release it fully functional.

  • Custom User Avatar

    Thank you to you and FArekkusu for taking the time to share your feedback. It will take a while - I have also to, like, work... - but I'll address the issues raised. Thank you again!

  • 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

    I think it'd be better if you asked for the board state after reversal, or at least the counts of the pieces, instead of cramming 3 different functions into 1 while also introducing this weird design of special handling a completely normal game state.

  • Custom User Avatar

    Module '"./solution"' declares 'Piece' locally, but it is not exported.

    Don't close issues without fixing anything.

  • Custom User Avatar
    import { assert, config } from "chai";
    config.truncateThreshold = 0;
    
  • Custom User Avatar
    {
      before: ['b', 63],
      after: ['b', 59]
    }
    {
      before: ['b', 59],
      after: null
    }
    

    Make this block correspond to the board example. Showing isolated inputs/outputs is useless.

  • Custom User Avatar

    Yes -- I had left a whole block of code behind. It should be fine now.

  • Custom User Avatar

    Any suggestion to make them better?

  • Custom User Avatar

    Excellent point. I have added it to description, code and tests.

  • Custom User Avatar

    It should be correct now. Probably...

  • Custom User Avatar

    Apologies -- I am a n00b here. I thought that random tests were taken from the general pool of test cases?

  • Loading more items...