Next / Previous / Contents / Shipman's homepage

29. Puzzle.__showRule(): Horizontal rule in .show() output

See Section 27, “Puzzle.show(): Display the state of the puzzle”.

kkck
# - - -   P u z z l e . _ _ s h o w R u l e

    def __showRule ( self, rowList ):
        '''Add the line that appears above and below the puzzle body.
        '''
        rowList.append ( "%s+%s+" %
                         (' '*2, '-'*(self.size[1]*2-1)) )