40
Jimmy Carlos
Last seen 1 year ago
Member for 6 years, 9 months, 15 days
Difficulty Normal
Don't take life too seriously.
Have fun and enjoy the ride.
This is the first solution I've seen that uses the fact that this puzzle is deterministic - eg, it doesn't matter what happens when the program runs - the winner is still the same. If the enemies has 5 million health, this would be exponentially faster than other solutions!
More
Very clear and good code. I would however change line 18 to:
unit_2.health -= unit_1.attack
Do you think that looks better?
More
A good solution, but parts of these could do with some documentation to understand what you are doing. For example, could you explain Lines 34-36?
More
This is really short solution. Given the difficulty of this problem, to solve it in 9 lines is very impressive!
More
Really clear, simple code. There's nothing I can see that needs to be improved.
More
I love the method name of bishbashbosh, so good to see humour in code. Any other fun names planned for future missions?
More
Nice implementation of the new Python features for fast class construction - do you think it helps?
More
I like this code and it is very well put together, however I don't understand the purpose of the get_attack method. Would it be simpler to put unit_1.attack instead of unit_1.get_attack()?
More
Like everyone else, I am mind-blown by Line 5, it's such a perfect implementation of that.
The little pun on Line 1 makes this code very fun to read - nice job!
More
This is a really good solution, I did not know about ascii_uppercase, but it really helps!
More
This is a fantastic implementation of recursion. Very clever!
More
Line 13 is very fun with the or_ and the starmap making it a one-liner.
More
I like line 23 - a really clean and sensible use of the yield keyword. Nice work!
More
Line 13 is very interesting - implementing which columns are lower than other using powers of -1. Nice work!
More