• Custom User Avatar

    done

  • Custom User Avatar

    it's unclear whether strings consisting entirely of spaces are possible input or not. the description does say that the string can be empty, and several languages have a fixed test with an empty string that results in an empty array, which is probably the intended answer for a string consisting entirely of spaces as well.

  • Custom User Avatar

    Merged

  • Custom User Avatar

    proposed fix there

  • Custom User Avatar

    I revamped the tests. The tests' structure is now as follows:

    [Test]
    public void FixedTests() { /* ... */ }
    
    [Test]
    [Repeat(100)]
    public void RandomTests()
    {
        Solution instance = new Solution(), Codewarrior instance = new SnakeLadders();
        for (int i = 0; i < 50; i++)
        {
            // roll 2 dice
            string exp = solution.play(dice);
            string act = codewarrior.play(dice);
            Assert.That(act) IsEqualTo(exp);
        }
    }
    
  • Custom User Avatar

    That's exactly what is being done, omitting the return keyword is just a common shorthand for 1 liner arrow functions

  • Custom User Avatar

    Nice kata, but it would be great to have a preloaded "events" dictionary that maps snakes and ladders where keys represent the old positions and values the new ones.

    This would save time and effort and help prevent mistakes from transfering the values by hand.

  • Custom User Avatar

    Couldn't it be better to show why the tests aren't passing?

    like saying the moves played so far so that I track where the problem in code is

    my code passed 1000 tests and didn't pass another 1000 ones

  • Custom User Avatar

    I liked this kata too much because it makes You to think hard in every marshroot case. Thank You very much!

  • Custom User Avatar

    replaced the HTML table with Markdown

  • Custom User Avatar

    Description table is hard to see in light mode.

  • Custom User Avatar

    Soooo cooooooooooooooooooooooooooool🚀

  • Custom User Avatar

    i enjoyed this one...thank you

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...