Ignore:
Timestamp:
09/23/09 23:56:15 (3 years ago)
Author:
Flupke <luper.rouch@…>
Children:
f862cc9092a9988eea1a30d617040be530eb4d15
Parents:
8ff53121022153f33f8619682042a8d38e7d181d
git-committer:
Flupke <luper.rouch@…> (09/23/09 23:56:15)
Message:

boxsort: commit to test dnd under windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boxsort/boxsort/__init__.py

    r88da727 r8fe8df2  
    8787        if len(side_boxes): 
    8888            # 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") 
    9093        else: 
    9194            # There is no side box, put an empty space at start 
     
    105108            except DeckOverflowError: 
    106109                garbage_boxes.append(box) 
     110        assert len(side_boxes) == 0 
    107111        return garbage_boxes 
    108112 
     
    205209            deck_id += 1 
    206210    # Continue aranging boxes while there are garbage boxes left 
     211    outfile.write("###################### BEGIN GARBAGE ######################\n") 
    207212    while garbage_boxes: 
    208         out_deck = Deck() 
     213        out_deck = Deck(size=decks_size, feather_size=feather_size) 
    209214        garbage_boxes = out_deck.place(garbage_boxes) 
    210215        out_count += len(out_deck.boxes) 
Note: See TracChangeset for help on using the changeset viewer.