You were exactly right - I needed to pass an object to the "compare_with" function instead of a string. My solution is ridiculously long compared to some others but I'm proud of my solution. Thank you!
That's weird... I believe the problem lays actually elsewhere in your code: I bet you create a new object somewhere with an object instead of string as parameter
Peeps, could use some help here. My solution works perfectly in PyCharm. When I paste it into the codewars console, I get this error: "PokerHand" object has no attribute 'split'. The error comes from the second line below (self.hand = hand.split()) - which is what I'm using to split the string into a list. Any ideas on how I can fix this?
My fault! I missed that the chessboard is infinite. Sorry :)
yep, possible.
I'm hoping the kata author could respond to these test errors. I really want to complete this!
It is possible
Python:
@Blind4Basics
This test seems invalid - test.assert_equals(attack((7,1), (3,3), ((5,1),(5,2),(5,0),(4,2),(4,4),(7,5))), 4)
There is no way to get from (7,1) to (3,3) with those obstacles in 4 moves - agree?
You were exactly right - I needed to pass an object to the "compare_with" function instead of a string. My solution is ridiculously long compared to some others but I'm proud of my solution. Thank you!
That's weird... I believe the problem lays actually elsewhere in your code: I bet you create a new object somewhere with an object instead of string as parameter
Peeps, could use some help here. My solution works perfectly in PyCharm. When I paste it into the codewars console, I get this error: "PokerHand" object has no attribute 'split'. The error comes from the second line below (self.hand = hand.split()) - which is what I'm using to split the string into a list. Any ideas on how I can fix this?
Note: python 2 only