Ad
  • Custom User Avatar

    Same here, dealing with two dimensional arrays in C# is unpleasant.
    I think also the actual and expected values are to be switched :D

  • Custom User Avatar

    okay, I'll see with Donald to add at least one fixed test (I'm actually surprised it's not already there)

  • Custom User Avatar
  • Custom User Avatar

    note: seems you didn't do RS4 yet. Don't forget to purge your RS5 solution before posting for RS4 when you'll be done with it (to not spoil the hardest one) ;)

  • Custom User Avatar

    np.
    Be careful with /*...//...\n..*/ too ;) (just in case)

  • Custom User Avatar

    according to the rules, here is what your purged program should look like:

    R1(RFR7F(F5))R5FR4((RR6F8P4)2((()2F6 )6RLLL2)2(F5 )P9)8LF(F6P7F)1F
    P5P9F(L2)7R
    L5F2FP6Fp0F
    FR7qp4p0(R1F()7)FR(F1)6Rp5p374qL0 L0FFF0qq(LFR)L5RF0
    R7P0FqLFL3(F4)F0L2L4F3L2Fp5L
    FF R(F)p2(()R9L())8L3LL p9LFL1R0RF7L2F R LFL8R1L8qP5RqP9qF L3R5
    RL5(L8)LL8P5P4RF(RR4)RLp6p3(P7LF1F)8L8FFFL3
    (P9P7R8)7P0LqP4RR3L3(
    R)8 L LqFP7FR P0F(( R)3(P7))F(R0L7FRL)R2L9L(RF(L1L(FRL3)FP9) )F6R6(((R7 )F0 ) )8L4p7
    
    RLL3p7p708()5LF5F4()RFR1RR5RLqqqp9 R9(FRR4F9L6)0R3(R4)1F(
    (
    R)7LF9)0RFF4L0P6FqP0LL2LP9L FRF1L4F7
    

    your code isn't managing the comments correctly.

    EDIT: when you post about a problem, don't forget to provide the exact behavior on the output side: what's the assertion/error message, for instance?

  • Custom User Avatar

    Found it: there was a tiny mistake in one of my regexp.

    Now compliant with your answers. Sorry for the troubles. ;)

  • Custom User Avatar

    okay, there is a problem, effectively. I'll take a look at this (but I don't have time for now)

  • Custom User Avatar

    Hi,

    Your algo isn't smart enough yet:

    Input       ||  Expected  || Variant 1 || Variant 2 (incomplete but resolvable)
                ||            ||           || the border has sufficient mines
    ------------||------------||-----------||------------------------------------            
    0 0 0 1 x   || 0 0 0 1 x  || 0 0 0 1 x || 0 0 0 1 x
    0 1 1 2 2   || 0 1 1 2 2  || 0 1 1 2 2 || 0 1 1 2 2
    1 2 x 1 0   || 1 2 x 1 0  || 1 2 x 1 0 || 1 2 x 1 0
    ? ? 2 1 0   || ? M 2 1 0  || M ? 2 1 0 || ? M 2 1 0
    ? ? 2 1 2   || ? ? 2 1 2  || ? M 2 1 2 || ? ? 2 1 2
    ? ? 2 x 2   || ? A 2 x 2  || ? A 2 x 2 || ? A 2 x 2
    ? ? ? 2 2   || ? M ? 2 2  || ? ? ? 2 2 || ? ? M 2 2
    ? ? ? 1 0   || ? ? M 1 0  || ? ? M 1 0 || ? ? ? 1 0
    

    if you look at the different versions upper, you'll see that you can actually safely open the position A, and that will lead you to the expected board.

  • Default User Avatar

    No problem with that test, except that it uses assertFalse, not assertTrue, and does it on purpose... ;)
    You should check again the "en passant" rule, it's a tricky one.