Open shangwyoung opened 8 years ago
I would just like to clarify the way that the auction is scored. The way that I understand it every space station must be compared to every other space station. For each comparison the person with the highest score in the most categories gets a point. We can also decide to award points to the person with the highest score in each category if we want. The person with the most points wins. After that we could conceivably sort the space stations by their score and display a ranking of the best space stations.
@aarony422 and @jun-nnn I completed a draft of the SpaceStation class in the space-station-class branch, so you can refer to the methods
Maybe Sort it like this? http://stackoverflow.com/questions/4010322/sort-a-list-of-class-instances-python
__cmp__
has been depreciated in python 3.
And I don't think it makes sense to implement a __eq__
method for space station class based on rankScore. So, I'm going with the other direction, using the key-function to sort based on an attribute suggested by the above stackoverflow page and the python How to Sort page:
Given a list of SpaceStation objects, sort the list by highest score first.