source/client/Controller.py
def handleEmptyHand(self, isDiscard):
        """Checks for and handles empty hand. 
        
        If they are out of their hand, transitions to the next hand.
        If they are out of all their hands checks if they are actually out
        If they are out notifies the server
        """
        if len(self._state.hand_cards) > 0:
            return False
        elif len(self._state.hand_list) > 0:
            self._state.nextHand()
            return False
        elif self._state.checkGoneOut():
            self.note = "You went out to end the round!"
            connection.Send({"action": "goOut"})
            self._state.went_out = True
            self._state.turn_phase = Turn_Phases[0] # end active state after going out.
            self.sendPublicInfo()
            return True
        else:
            self.note = "You have no cards left but aren't out, you have gone zaphod."
            if not isDiscard:
                #If you played to zaphod we need to let the server know your turn is over
                self._state.turn_phase = Turn_Phases[0]
                connection.Send({"action": "discard", "cards": []})
            return False
Checks for and handles empty hand. 
        
        If they are out of their hand, transitions to the next hand.
        If they are out of all their hands checks if they are actually out
        If they are out notifies the server
        
Checks for and handles empty hand.
If they are out of their hand, transitions to the next hand.
If they are out of all their hands checks if they are actually out
If they are out notifies the server
Checks for and handles empty hand . If they are out of their hand transitions to the next hand . If they are out of all their hands checks if they are actually out If they are out notifies the server
def handleEmptyHand(self, isDiscard):
        if len(self._state.hand_cards) > 0:
            return False
        elif len(self._state.hand_list) > 0:
            self._state.nextHand()
            return False
        elif self._state.checkGoneOut():
            self.note = "You went out to end the round!"
            connection.Send({"action": "goOut"})
            self._state.went_out = True
            self._state.turn_phase = Turn_Phases[0] 
            self.sendPublicInfo()
            return True
        else:
            self.note = "You have no cards left but aren't out, you have gone zaphod."
            if not isDiscard:
                self._state.turn_phase = Turn_Phases[0]
                connection.Send({"action": "discard", "cards": []})
            return False
def handleEmptyHand ( self , isDiscard ) : if len ( self . _state . hand_cards ) > 0 : return False elif len ( self . _state . hand_list ) > 0 : self . _state . nextHand ( ) return False elif self . _state . checkGoneOut ( ) : self . note = "You went out to end the round!" connection . Send ( { "action" : "goOut" } ) self . _state . went_out = True self . _state . turn_phase = Turn_Phases [ 0 ] self . sendPublicInfo ( ) return True else : self . note = "You have no cards left but aren't out, you have gone zaphod." if not isDiscard : self . _state . turn_phase = Turn_Phases [ 0 ] connection . Send ( { "action" : "discard" , "cards" : [ ] } ) return False
Checks for and handles empty hand.
Checks for and handles empty hand .
"""Checks for and handles empty hand. 
        
        If they are out of their hand, transitions to the next hand.
        If they are out of all their hands checks if they are actually out
        If they are out notifies the server
        """ # end active state after going out. #If you played to zaphod we need to let the server know your turn is over
self
isDiscard