Mercurial > traipse_dev
diff orpg/networking/mplay_groups.py @ 71:449a8900f9ac ornery-dev
Code refining almost completed, for this round. Some included files are still in need of some clean up, but this is test worthy.
author | sirebral |
---|---|
date | Thu, 20 Aug 2009 03:00:39 -0500 |
parents | 4385a7d0efd1 |
children | d1aff41c031b |
line wrap: on
line diff
--- a/orpg/networking/mplay_groups.py Tue Aug 18 20:48:36 2009 -0500 +++ b/orpg/networking/mplay_groups.py Thu Aug 20 03:00:39 2009 -0500 @@ -1,7 +1,9 @@ from orpg.mapper.map_msg import * class game_group: - def __init__( self, id, name, pwd, desc="", boot_pwd="", minVersion="", mapFile=None, messageFile=None, persist =0 ): + def __init__( self, id, name, pwd, desc="", + boot_pwd="", minVersion="", + mapFile=None, messageFile=None, persist=0 ): self.id = id self.name = name self.desc = desc @@ -33,8 +35,7 @@ self.players.append(id) def remove_player(self,id): - if self.voice.has_key(id): - del self.voice[id] + if self.voice.has_key(id): del self.voice[id] self.players.remove(id) def get_num_players(self): @@ -45,7 +46,6 @@ tmp = self.players return tmp - def check_pwd(self,pwd): return (pwd==self.pwd) @@ -61,13 +61,10 @@ w=max(len(minVersion[i]),len(version[i])) v1=minVersion[i].rjust(w); v2=version[i].rjust(w); - if v1<v2: - return 1 - if v1>v2: - return 0 + if v1<v2: return 1 + if v1>v2: return 0 - if len(minVersion)>len(version): - return 0 + if len(minVersion)>len(version): return 0 return 1 #depreciated - see send_group_list()