Ad
  • Default User Avatar

    At this point I don't know whether having less code is a priority for this person XD

  • Default User Avatar

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

  • Custom User Avatar
    public bool Equals(Either<TL, TR> other)
    {
        return IsLeft == other.IsLeft;
    }
    

    This method is cheating - it considers all objects with TL type are equal.

  • Custom User Avatar

    C# tests are failing - firstly because AreEqual is trying to compare instances instead of values (which always fails, because of new), two - when trying to attempt, they fail to compile because of the lack of the function IsoMaybe (changing Maybe to IsoMaybe in sources helps somehow, but still leaves us with the first problem).
    So - basically, the kata for C# is broken, it is worth to consider some changes.

  • Custom User Avatar

    Another test that should fail:

             int[,] field = new int[10, 10]
               {{1, 0, 0, 0, 0, 1, 1, 0, 0, 0},
                {1, 0, 1, 0, 0, 0, 0, 0, 1, 0},
                {1, 0, 1, 0, 1, 1, 1, 0, 1, 0},
                {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
                {0, 0, 0, 0, 1, 0, 1, 0, 0, 0},
                {0, 0, 0, 0, 1, 0, 0, 0, 1, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 1, 0, 0, 0, 1, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
    

    Testing horizontal ships after vertical leads to an error of treating 2- and 1-square ships ((5,4)-(6,4) and (5,6)) together as one 3-square ship.
    The length variable stops at 2 for the vertical ship, and then we test horizontal ship which is one square away as it was a continuation of the first one.

  • Custom User Avatar

    It is not an increasing sequence.

  • Custom User Avatar

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