Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
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.
After completing the kata, I believe it's more about math. Although, it's inspiring to see nice pythonistic solutions
No, the first drop will be at a level that provides you have a full coverage of all floors below in the worst case scenario i.e. all egs will brake one after another.
If the first egg brakes, the seacond drop is not in the middle of all levels below. It's closer to the bottom, than the top (level the fist egg broke). So, the spacing is not halved at every attempt as one may think.
total tries
This test looks wrong:
[{'owner': 0, 'y': 4, 'piece': 'pawn', 'x': 6}, {'owner': 0, 'y': 5, 'piece': 'pawn', 'x': 5}, {'owner': 0, 'y': 6, 'piece': 'pawn', 'x': 3}, {'owner': 0, 'y': 6, 'piece': 'pawn', 'x': 4}, {'owner': 0, 'y': 6, 'piece': 'pawn', 'x': 7}, {'owner': 0, 'y': 7, 'piece': 'queen', 'x': 3}, {'owner': 0, 'y': 7, 'piece': 'king', 'x': 4}, {'owner': 0, 'y': 7, 'piece': 'bishop', 'x': 5}, {'owner': 0, 'y': 7, 'piece': 'knight', 'x': 6}, {'owner': 0, 'y': 7, 'piece': 'rook', 'x': 7}, {'y': 4, 'prevY': 0, 'x': 7, 'owner': 1, 'prevX': 3, 'piece': 'queen'}, {'owner': 1, 'y': 0, 'piece': 'king', 'x': 4}]:
White King is being checked, but per test it's balck's move. Kind of impossible situation
try to use print at some points in the routine to see if the program is doing what you are expecting it do
Even though 3 comes after the frist 5, 7 comes before the 2nd 5. Hence, 3,7 as a pair comes earlier.