source/server/GameServer.py
def cardBuyingResolution(self):
        """ Resolve who gets to purchase card for games with Buy_Option = True
        This is called upon player clicking on draw pile. """
        timelimit = time() + self.rules.purchase_time
        buying_phase = True # else this routine would not be called
        i_max = len(self.players) - 2
        index = (self.turn_index + 1) % len(self.players)
        icount = 0
        while buying_phase and icount < i_max:
            while self.players[index].want_card is None and time() < timelimit:
                # wait patiently(?) while updating information from players, timer begins when
                # next player attempts to draw.
                self.Pump()
                sleep(0.0001)
            if self.players[index].want_card:
                self.Send_buyingResult(self.players[index].name)
                # send cards
                cards = self.players[index]._server.drawCards()   # note number of cards is same as DrawSize
                cards = cards + self.players[index]._server.pickUpPile()   # number of cards is same as Pickup_Size
                self.players[index].Send_newCards(cards)
                self.Send_discardInfo()
                buying_phase = False
            index = (index + 1) % len(self.players)
            icount = icount + 1
        if buying_phase == True:
            self.Send_buyingResult('No one')
 Resolve who gets to purchase card for games with Buy_Option = True
        This is called upon player clicking on draw pile. 
Resolve who gets to purchase card for games with Buy_Option = True
This is called upon player clicking on draw pile.
Resolve who gets to purchase card for games with Buy_Option = True This is called upon player clicking on draw pile .
def cardBuyingResolution(self):
        timelimit = time() + self.rules.purchase_time
        buying_phase = True 
        i_max = len(self.players) - 2
        index = (self.turn_index + 1) % len(self.players)
        icount = 0
        while buying_phase and icount < i_max:
            while self.players[index].want_card is None and time() < timelimit:
                self.Pump()
                sleep(0.0001)
            if self.players[index].want_card:
                self.Send_buyingResult(self.players[index].name)
                cards = self.players[index]._server.drawCards()   
                cards = cards + self.players[index]._server.pickUpPile()   
                self.players[index].Send_newCards(cards)
                self.Send_discardInfo()
                buying_phase = False
            index = (index + 1) % len(self.players)
            icount = icount + 1
        if buying_phase == True:
            self.Send_buyingResult('No one')
def cardBuyingResolution ( self ) : timelimit = time ( ) + self . rules . purchase_time buying_phase = True i_max = len ( self . players ) - 2 index = ( self . turn_index + 1 ) % len ( self . players ) icount = 0 while buying_phase and icount < i_max : while self . players [ index ] . want_card is None and time ( ) < timelimit : self . Pump ( ) sleep ( 0.0001 ) if self . players [ index ] . want_card : self . Send_buyingResult ( self . players [ index ] . name ) cards = self . players [ index ] . _server . drawCards ( ) cards = cards + self . players [ index ] . _server . pickUpPile ( ) self . players [ index ] . Send_newCards ( cards ) self . Send_discardInfo ( ) buying_phase = False index = ( index + 1 ) % len ( self . players ) icount = icount + 1 if buying_phase == True : self . Send_buyingResult ( 'No one' )
Resolve who gets to purchase card for games with Buy_Option = True
This is called upon player clicking on draw pile.
Resolve who gets to purchase card for games with Buy_Option = True This is called upon player clicking on draw pile .
""" Resolve who gets to purchase card for games with Buy_Option = True
        This is called upon player clicking on draw pile. """ # else this routine would not be called # wait patiently(?) while updating information from players, timer begins when # next player attempts to draw. # send cards # note number of cards is same as DrawSize # number of cards is same as Pickup_Size
self