[Community puzzle] Cards castle

This topic is about the puzzle Cards castle.

Feel free to send your feedback or ask some help here!

Too much tips in the summary… The only task of this puzzle is to translate the following text to code :

A card castle is unstable if :

  • a “/” card is missing before a “” card ("." is UNSTABLE)
  • a “” card is missing after a “/” card ("/." is UNSTABLE)
  • two cards side by side have the same orientation ("//" or “/\” is UNSTABLE)
  • neither another card nor the ground are below (aka. a “flying card”)
  • the card below has the same orientation
1 Like

I think i would have much more feedbacks about “How to know if it is stable or not ?”

You just can’t say to someone to look at test cases to complete the puzzle, this isn’t a Reversed CoC

Is following test case considered?
last character of a line ends with a ‘/’?
I did not find it in the single test cases to check the my code.

Makes sense but is it really needed to specify that flying cards are not possible or that after a ‘/’ you need a ‘’ ?

Can I get hints to what I’m doing wrong with the code I’ve submitted?
I failed validation 16 & 17 (Same card side by side, and Same flying card side by side). But I pass all test cases.

Is card stable when it pushes the border of array like that ‘\…/’?
According to most of testcases seems like it is, but then i have no idea whats the problem in testcase 8