49
Phil15
30 56 64 Leader of the month
23157/ 25141
Last seen 2 hours ago
Member for 6 years, 3 months, 11 days
Difficulty Advanced
I was a math teacher in France for two years. I'm currently reconverting to IT, I'm here to improve my Python skills, and practice English.

Best reviews / Newest reviews
The Vampires-JimmyCarlos 2 1
Others units than Warrior are subclasses of Warrior, so you don't have to copy is_alive property each time, only one time in the Warrior class. If you think Army class like a list, consider (It wasn't my first idea but it's realy great) class Army(list): #Each instance of Army is a lis More
Need for Refactoring-von.Oak 1 1
You can define methods in your classes for simplify your code. Your fight function has become ugly from my perspective. Details of a specific unit "have to" be in the class of the specific unit. Imagine your fight function with an hundred of differents units. :-D It's only my opinion, I only make cl More
Best solution for a M x N grid, using matrices (modulo 2)-Phil15
I have the game on my computer. And it’s really amazing to be able to solve a 20x20 grid. But instead of a list of lights like on_panels, I prefer a string input like “00001 01000 00110 00100 00000” vs [5, 7, 13, 14, 18] because my game don’t show numbers. This other algorithm return a string of the More
My first real yield generator: recursively generates partitions/dices until we have solution (if it exists).-Phil15
### I am particularly proud of my partition generator. _I think it is really beautiful thing!_ I noticed with other codes that "test(i,j)" can be replaced by "(i>j)-(iMore
sorted-Cjkjvfnby
I don't like it, why sort all the list when you just want min or max? Bad computational complexity here : if n is the length of the list/iterable... O(n log n) instead of O(n) when you just look the iterable's elements one by one. For me, the purpose here is not use a powerful function like sorted. More
1 2 3 4 5 6 7 8 9 10 11 12
13