Ad
  • Custom User Avatar

    clarified

  • Custom User Avatar

    Ideally, all positions need to be clear about the previous move. But, as we both agree that previous position matters for en passant cases only, for tesing purposes you can ommit it if it's not en passant situation as it does not matter what piece made the last move. If you worried about getting an error while reading the previous position, use an error free reading option. Not sure what language you are using, but Python has one.

    Another thing that's not perfect: I encountered one test that is not correct: a king is under a check, but a move belongs to the other player. I provided details in my other post below.

  • Custom User Avatar

    En passant is a case when previous position of the pawns matters. If a pawn just moved you can apply the en passant rule. If you did not use the rule right away you lose the opportunity to capture the en passant pawn.

  • Custom User Avatar

    Wow this is fun, once I understood what I was meant to do. Not being able to compile outside the site is a pain though.

    I'm glad you like it. You should be able to run it outside of the site. I myself used just javac and java to write it.

    Anyway, I'm almost done only missing primeS, but I've gotten a couple random failures on the filters test (filterS should preserve satisfying elements
    ).

    All what this test does is check whether the stream filters the even ones with the predicate x -> x % 2 == 0.

    It could be that your fromS or takeS is not working properly (unfortunately I have to use those for testing). Try to play arround and look at some concrete values in your own test.