Permalink
Browse files

Added property universe.all_planets

  • Loading branch information...
1 parent 1cef98e commit 434b322e205fa276ffa1983c457f665c292f5ec5 @simu committed Sep 10, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 planetwars/universe.py
View
@@ -99,6 +99,10 @@ def nobodies_planets(self):
def not_my_planets(self):
return self.find_planets(owner=player.NOT_ME)
+ @property
+ def all_planets(self):
+ return self.not_my_planets | self.my_planets
+
def weakest_planets(self, owner, count=1):
"""
Returns a set of `count' planets with the smallest ship_count.

0 comments on commit 434b322

Please sign in to comment.