Module: Tetromino
- Extended by:
- Forwardable
- Defined in:
- lib/tetromino.rb,
lib/tetromino/args.rb,
lib/tetromino/version.rb,
lib/tetromino/exceptions.rb
Defined Under Namespace
Modules: Exceptions
Constant Summary collapse
- BOX_ARGS =
i[dimensions max_weight].freeze
- ITEM_ARGS =
i[dimensions weight stackable invertible packed].freeze
- PACKER_ARGS =
i[box boxes_limit].freeze
- PACKING_ARGS =
i[placements weight spaces].freeze
- PLACEMENT_ARGS =
i[dimensions position weight].freeze
- SPACE_ARGS =
i[dimensions position].freeze
- VERSION =
"0.1.2"
Class Method Summary collapse
Class Method Details
.packer(dimensions: [0, 0, 0], max_weight: nil, boxes_limit: 1) ⇒ Object
15 16 17 18 |
# File 'lib/tetromino.rb', line 15 def self.packer(dimensions: [0, 0, 0], max_weight: nil, boxes_limit: 1) box = Tetromino::Box.new(dimensions, max_weight) Tetromino::Packer.new(box, boxes_limit) end |