seshbot-packing 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 876fae06d90ffcfa93a6ff2c543595b317be2c6c6f8cf3d311d6c2851206b793
4
- data.tar.gz: 3bbac8434283bc50469928db836a390cab625e77bdfccb12db6345593b53809a
3
+ metadata.gz: fcd108047bea2fe4b890f489dfae607149553eda6580377307ba0da508b09106
4
+ data.tar.gz: fa66fc1bf3d90177921fd3abb9916140bffe80d83a3ebcd991e4ea7c6090bf26
5
5
  SHA512:
6
- metadata.gz: 0f219d09e54f88bea303576c363d1f62a4e9f00540c49ace087d5f4789ad7f200a915c2d3e36f19bd8aa5cd17a1d054629cba7cd41bd9631202c2656a013942b
7
- data.tar.gz: b33866fd2549c75554b34419df98969d1672287645384149a537869f884a76dd6634a143c20aadfa11689978c7be4e2e2973f38ab315d2cb87161546b2a56bd2
6
+ metadata.gz: 489a49b0e178294f885d70301b339292a85de575044a6c4a1473a25793cf851f288b95a50530c26fb6fadfc5b94639f4eaec35c218aa659be37a064942597b16
7
+ data.tar.gz: 6e2bd8737ef03133ae76ae6811f6ddc96efe5e72ff8db287471a0be89f8c631587335f8032a69196498bf4d449548b628d98d24adecde619845a7b2dc58c4266
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seshbot-packing (0.3.0)
4
+ seshbot-packing (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -49,8 +49,14 @@ module Seshbot
49
49
 
50
50
 
51
51
  def unpack(product_type_counts)
52
- result = pack_single_step(product_type_counts, unpacking: true)
53
- result
52
+ final_result = product_type_counts
53
+
54
+ while true
55
+ new_result = pack_single_step(final_result, unpacking: true)
56
+ break if new_result == final_result
57
+ final_result = new_result
58
+ end
59
+ final_result
54
60
  end
55
61
 
56
62
  def pack_single_step(product_type_counts, unpacking:)
@@ -4,23 +4,53 @@ module Seshbot
4
4
  class << self
5
5
  def get_recipes
6
6
  {
7
- "twenty_four_pack_4"=>{
7
+ "bottles_twenty_four_pack_4"=>{
8
8
  "input_fragment"=>"B306",
9
9
  "input_quantity"=>4,
10
10
  "output_fragment"=>"B324",
11
11
  "output_quantity"=>1
12
12
  },
13
- "twenty_four_pack_3"=>{
13
+ "bottles_twenty_four_pack_3"=>{
14
14
  "input_fragment"=>"B306",
15
15
  "input_quantity"=>3,
16
16
  "output_fragment"=>"B318",
17
17
  "output_quantity"=>1
18
18
  },
19
- "twelve_pack"=>{
19
+ "bottles_twelve_pack"=>{
20
20
  "input_fragment"=>"B306",
21
21
  "input_quantity"=>2,
22
22
  "output_fragment"=>"B312",
23
23
  "output_quantity"=>1
24
+ },
25
+ "bottles_six_pack"=>{
26
+ "input_fragment"=>"B301",
27
+ "input_quantity"=>6,
28
+ "output_fragment"=>"B306",
29
+ "output_quantity"=>1
30
+ },
31
+ "cans_twenty_four_pack_4"=>{
32
+ "input_fragment"=>"C306",
33
+ "input_quantity"=>4,
34
+ "output_fragment"=>"C324",
35
+ "output_quantity"=>1
36
+ },
37
+ "cans_twenty_four_pack_3"=>{
38
+ "input_fragment"=>"C306",
39
+ "input_quantity"=>3,
40
+ "output_fragment"=>"C318",
41
+ "output_quantity"=>1
42
+ },
43
+ "cans_twelve_pack"=>{
44
+ "input_fragment"=>"C306",
45
+ "input_quantity"=>2,
46
+ "output_fragment"=>"C312",
47
+ "output_quantity"=>1
48
+ },
49
+ "cans_six_pack"=>{
50
+ "input_fragment"=>"C301",
51
+ "input_quantity"=>6,
52
+ "output_fragment"=>"C306",
53
+ "output_quantity"=>1
24
54
  }
25
55
  }
26
56
  end
@@ -1,5 +1,5 @@
1
1
  module Seshbot
2
2
  module Packing
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seshbot-packing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-15 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: