Exemple #1
0
 def pressed(self):
     g = self.gamelist[self.current[0]]
     p = players.find_player(g[0])
     if self.current[1] == 0:
         snd.play('select_choose')
         if not p:
             p = players.Player('')
         global lastplayer
         lastplayer = p
         game.player = p
         self.clearlist()
         self.moveto((860, 500))
         self.done = 1
     else:
         snd.play('delete')
         players.players.remove(p)
         self.buildlist()
         self.current = [0, 0]
         self.moveto((120, 110))
Exemple #2
0
    def __init__(self, prevhandler):
        self.prevhandler = prevhandler
        self.images = images
        self.done = 0
        self.aborted = 0
        self.gamelist = []
        self.current = [0, 0]
        self.buildlist()
        self.current = [0, 0]
        self.shipmovex = 40
        self.shipmovey = 16

        step = 0
        if lastplayer:
            for g in self.gamelist:
                if players.find_player(g[0]) == lastplayer:
                    self.current[0] = step
                    self.buildlist()
                step += 1

        self.moveto(self.gamelist[self.current[0]][1][1])