       side: 'depth'
       value: parcel.depth
     ]
-    sides = sides.sort (a, b)->
-      b.value - a.value
+
+    if sort is 'asc'
+      sides = sides.sort (a, b)->
+        a.value - b.value
+    else
+      sides = sides.sort (a, b)->
+        b.value - a.value
 
     sides
   ###


  _pushParcel: (parcel, table)->

    longestSideOfBox = @_longestSide @

    debug "longestSideOfBox.side: #{longestSideOfBox.side}"
    debug "table[longestSideOfBox.side]: #{table[longestSideOfBox.side]}"
    debug "parcel[table[longestSideOfBox.side]]: #{parcel[table[longestSideOfBox.side]]}"
    @[longestSideOfBox.side] -= parcel[table[longestSideOfBox.side]]

  pushParcel: (parcel)->
    unless @canContain parcel
      return false

    # 箱を最大限に活かすために，
    # 箱の最短辺と荷物の長辺を比較．

  ###
  辺の長さでソートしたのを返す
  ###
  _sortSide: (parcel, sort)->
    sides = [
      side: 'width'
      value: parcel.width
