wordl-solver 1.0.0 → 1.1.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: fd25b19a895e26f76a0a54958837d3060d6cc1a6f841ee591fb955c906e84157
4
- data.tar.gz: df22d9551946792629679399209ed8d08b511c5e779ef49c57e6bd8f6b0f9535
3
+ metadata.gz: 6c5a1924c753f31c2ef7743c60dfa92a4fcc11f1a17b67e830177568b16c1183
4
+ data.tar.gz: ff758feaad086580f47b4917fff81a127f5eb7762209feffc15ce8e15f1fb644
5
5
  SHA512:
6
- metadata.gz: a8a7013eae494b0dbc7520c0df9366af215c318e97afd44a10596d8943f3abdd4e855aa4a3ae7260375a0d390c3766da6ed4ef6c8f54d2d3387c8043aa588164
7
- data.tar.gz: e976e4b8895a49cc40eeb6aa73e62c34286a8830fa261827ecb1d01e67253c0ec981c04beb626f730c039d1ac38991fb5f992aa8e0ef87318dc89dff69642c51
6
+ metadata.gz: 618ab2bee3b4d7110c04a85eb4c0331519534614f445a6e658967022a27fb9b2c79fc2d73b4a3bf490839c5f25faed450e2ff431e1b28831cb567eee8efff363
7
+ data.tar.gz: c630e958527faacc98d229ed3f5514a723fe96f49f7931ca262973f5a6ce1b99bb43d1d057a9c72eceb8dea1fc4aa28e47206279196f53f5f76a6e917a3fba5d
data/README.rdoc CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  Description goes here.
4
4
 
5
+ This is a tool I've built to help me solve wordle.
6
+ It does so by providing all the 5 letter words, ordering them by the frequency of the letters and filter them depending on the the colours.
7
+
8
+
9
+ ** Still To DO
10
+
11
+ - have the logic for when a letter appear twice or not
12
+ - allow to correct the inputs
13
+ - clean the code a bit more
14
+
5
15
  == Contributing to wordl-solver
6
16
 
7
17
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/lib/wordl_solver.rb CHANGED
@@ -76,6 +76,7 @@ class WordlSolver
76
76
  else
77
77
  @greens[t] = letters[1]
78
78
  end
79
+ @greys.filter! { |letter| @greens.include?(letter) || @yellows.values.flatten.include?(letter) }
79
80
  end
80
81
 
81
82
  def find_possible_words
@@ -97,7 +98,7 @@ class WordlSolver
97
98
  hash_word_frequency[word] = count
98
99
  end
99
100
  hash_word_frequency = hash_word_frequency.sort_by { |_k, v| v }
100
- hash_word_frequency.last(30).each do |word, count|
101
+ hash_word_frequency.each do |word, count|
101
102
  p "#{word} : #{count}"
102
103
  end
103
104
  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.0.0 ruby lib
5
+ # stub: wordl-solver 1.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "wordl-solver".freeze
9
- s.version = "1.0.0"
9
+ s.version = "1.1.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-05-19"
14
+ s.date = "2022-05-20"
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]
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.0.0
4
+ version: 1.1.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-05-19 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda