Next / Previous / Contents / Shipman's homepage

31. Puzzle.showAllChoices()

This service routine shows the current set of choices for all slots.

kkck
# - - -   P u z z l e . s h o w A l l C h o i c e s

    def showAllChoices ( self ):
        '''Display all slots and their current choices.
        '''
        slotList = self.__slotMap.values()
        slotList.sort()
        for slot in slotList:
            print "  == Choices for %s" % slot
            wordList = [ slot
                for slot in self.__wordBank.genSlotChoices ( slot ) ]
            wordList.sort()
            for word in wordList:
                print word,
            print