shangwyoung / Space_Station_Auction

WT 2016
2 stars 0 forks source link

Space Station Class #15

Open nickmusic opened 8 years ago

nickmusic commented 8 years ago

It would have a field which contains all the modules that that space station's bidder has won. It would also keep track of the sum total of the different categories for that agent. We could use this to compute scores at the end by pitting players space-stations against each other.

tbwexler commented 8 years ago

I'm not sure a space station should be a subclass of card. A station has a collection of cards, along with some summary information. Typically "has-a" relationships don't lend themselves to subclassing, whereas "is-a" relationships do. E.g. if we had special bonus cards, bonus_card would be a natural candidate for a subclass to card, since a bonus card is a type of card. But a station, while it has one or more cards, isn't itself a card. So it makes more sense for that to be its own class, along with (among other things) a field for a list of cards.

shangwyoung commented 8 years ago

Yeah. I'm pretty sure we decided it wasn't a subclass of Card by the end of the meeting last night. I think this is just a mistake. In fact, Nick's implementation of the space station class on the space-station-class branch is not a subclass of Card.

nickmusic commented 8 years ago

Sorry, I corrected the comment. Space Station is definitely NOT a subclass of card.

shangwyoung commented 8 years ago

For sorting the Space Stations, could we have the Space Station Class have a variable named something like "rankScore". I think that'll really help. @nickmusic

I might add more instance variables to the Space Station class as we decide on other ways to score the space stations.

nickmusic commented 8 years ago

@aarony422 I just added the field you asked for as well as a method called getRank(). I also added a getValue() method just in case we want it later. I will submit a pull request shortly.