wordl-solver 1.3.0 → 1.4.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: fb3bf465211db353a6705e7a34a9678ab1c054e02fc8ee99c6420577705b8a09
4
- data.tar.gz: 90e1a0ccec7e76c4c4e9609f8e55a858c557b7db48d73658ec0f3c8acb59f3cf
3
+ metadata.gz: 3efe4e2edfac6ae7fddccd6b38b2fe803fbbc35c4e3ae01cbbb609c611a40124
4
+ data.tar.gz: 5d99360b9bdacf90248bb7c6b6a16a944f681b93baa33daa4aca7486b2c17b4e
5
5
  SHA512:
6
- metadata.gz: 7056a94cb5ad3f64cd8bbef26ae67e5bc72a7f85df20ad5084ef49e7a8f882236cb6fd6c97de30ee67f338035b14b5176838a74ac09bc473d8c5de46e33ff23b
7
- data.tar.gz: b549d2effd15ae76b8910efaba4912d3f2f2974c335a2b5d5e99f08bcf79433f6256d2da37ce02f3e5ce57019e282d88a0caf185f05eb2ac135ce7831b1931b2
6
+ metadata.gz: 8765927089a057472a1545f754bcaef4a715475ca29fc38afd71a0e44bb58d9248b8abd470f1a538b1ce70b535cb9d9e4b862da4d6826bb9f446132765457a13
7
+ data.tar.gz: 8cf74de88be9641c8f486ae84b8448273d64e1d5a60c2e2ffbd313c1e991288627d9c12503df53724b6c40cc06d8b0d42a778a35f5d8ef410c040b5ff4f47a0d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.4.0
data/lib/wordl_solver.rb CHANGED
@@ -51,7 +51,13 @@ class WordlSolver
51
51
 
52
52
  def filter_greys
53
53
  @possible_words.reject! do |word|
54
- @greys.any? { |letter| word.include?(letter) }
54
+ @greys.each do |letter|
55
+ if @greens.values.include?(letter)
56
+ word.count(letter) > 1
57
+ else
58
+ word.include?(letter)
59
+ end
60
+ end
55
61
  end
56
62
  end
57
63
  end
data/wordl-solver.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: wordl-solver 1.3.0 ruby lib
5
+ # stub: wordl-solver 1.4.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "wordl-solver".freeze
9
- s.version = "1.3.0"
9
+ s.version = "1.4.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["george kosmopoulos".freeze]
14
- s.date = "2022-06-16"
14
+ s.date = "2022-12-24"
15
15
  s.description = "This gem helps you solve wordl puzzles. It does so by asking you for the letters position you know, the letters you know exists and the ones you know don't exists. It then proposes words depending on how good they are by weighting the letters by their frequency in the english language.".freeze
16
16
  s.email = "gkosmo1@hotmail.com".freeze
17
17
  s.executables = ["wordl-solver".freeze]
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
35
35
  ]
36
36
  s.homepage = "http://github.com/gkosmo/wordl-solver".freeze
37
37
  s.licenses = ["MIT".freeze]
38
- s.rubygems_version = "3.3.10".freeze
38
+ s.rubygems_version = "3.3.7".freeze
39
39
  s.summary = "This gem solves wordl puzzles.".freeze
40
40
 
41
41
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordl-solver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - george kosmopoulos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-16 00:00:00.000000000 Z
11
+ date: 2022-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.3.10
126
+ rubygems_version: 3.3.7
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: This gem solves wordl puzzles.