- Timestamp:
- 09/23/09 23:56:15 (3 years ago)
- Children:
- f862cc9092a9988eea1a30d617040be530eb4d15
- Parents:
- 8ff53121022153f33f8619682042a8d38e7d181d
- git-committer:
- Flupke <luper.rouch@…> (09/23/09 23:56:15)
- File:
-
- 1 edited
-
boxsort/boxsort/__init__.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boxsort/boxsort/__init__.py
r88da727 r8fe8df2 87 87 if len(side_boxes): 88 88 # There is at least one side box, place it at start 89 self.append(side_boxes.pop(0)) 89 try: 90 self.append(side_boxes.pop(0)) 91 except DeckOverflowError: 92 raise ArangeError("can't place first box") 90 93 else: 91 94 # There is no side box, put an empty space at start … … 105 108 except DeckOverflowError: 106 109 garbage_boxes.append(box) 110 assert len(side_boxes) == 0 107 111 return garbage_boxes 108 112 … … 205 209 deck_id += 1 206 210 # Continue aranging boxes while there are garbage boxes left 211 outfile.write("###################### BEGIN GARBAGE ######################\n") 207 212 while garbage_boxes: 208 out_deck = Deck( )213 out_deck = Deck(size=decks_size, feather_size=feather_size) 209 214 garbage_boxes = out_deck.place(garbage_boxes) 210 215 out_count += len(out_deck.boxes)
Note: See TracChangeset
for help on using the changeset viewer.
