Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar
  • Custom User Avatar

    A little hint concerning "STRAIGHT":

    1. The numbers in the string must be sorted in ascending order
      For example, 34561 => 13456

    2. If there is no 2 in the string, 1 must be the number 7. This is necessary to make an arithmetic progression.
      For example, 13456 => 34567 (1 => 7).
      If you get an arithmetic progression from the end string, then the string can be designated as STRAIGHT.

    3. If the string has 2 and 1, you just have to check if the numbers in the string make an arithmetic progression

    4. If there is no 1 in the string, you have to do the same thing as 3.

  • Custom User Avatar

    Five consecutive numbers, in any order, 1 could be seen as 1 or 7.

  • Default User Avatar

    Do not really understand a straight condition. Can someone help me?

  • Custom User Avatar

    Clarified how to use the wildcard.

  • Custom User Avatar

    The 1 as a wildcard is already in the STRAIGHT item description, it's not a wildcard for any other result. And 44441 is a POKER, it's already in the description ;)

  • Custom User Avatar

    I solved this kata according to your comment, but in my opinion 12341 and 13451 match the STRAIGHT description.
    It would also be nice to add that the wildcard 1 rule only applies to STRAIGHT, because what about the case of 44441? This is not GENERALA 😉

  • Default User Avatar

    Damn that straight condition is straight up fcked up.

  • Custom User Avatar

    Because in 13654 the straight is 34561

    Dice with value 1 is a wildcard that can be used at the beginning of the straight, or at the end of it.

  • Custom User Avatar

    No what I'm trying to say is if 13654 is a straight then how can 12346 is not as it is in sequence and just missing a 5 as the earlier one is missing a 2.

  • Custom User Avatar

    No, and that's in the description.

  • Custom User Avatar

    12346 should be equal to 20 rather than 0 in the last test case for js.

  • Default User Avatar

    While I agree on the part with the description cleanup, your example is wrong, as the wildcards could either be interpreted as 34567 which is not valid since 7 is not on the dice and otherwise 23456, where 3 violates the "only at be beginnig or end" rule.
    13451 on the other hand is unclear if it would be accepted.

  • Custom User Avatar

    Ruby 3.0 should be enabled, see this to learn how to do it

    Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)

    describe "<This message should describe the categories of test groups inside this block>" do
      it "<A short message describing this test group>" do
        expect(...).to eq(...) #Assertions
        #Or Test.assert_equals(user_response, reference_response)
      end
    end
    
  • Loading more items...