wordle 0.2.1 → 0.3.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: bceb772c3a50a1803ac5c31a26e2e5bed4f513fe3ed3dfcf3e49f1dc81bbe8db
4
- data.tar.gz: ad55755d24fa6fa2a958f48b4eecec62fc1778174bf387f21ef95b3834e1908e
3
+ metadata.gz: ff0c43c46f9e5e2e25088128a3cd8e2f634bda564b98a0b36473c0d9fb1a25b7
4
+ data.tar.gz: bbcaf825639fd41c6388b501388cc108048d1c4464e59a3cad7eaa2451586679
5
5
  SHA512:
6
- metadata.gz: de15a996681e69b87c62b883acdcb7f75295d96e4eadae1f733af630bc699a8024e3579ee52d110d74c11faa17cb6339500fa884efcb6319119fb5edf15f4bba
7
- data.tar.gz: b3949c9858e6b02234d74ef791df3acba82334ee0a4dd92bd86fb65c84bbc1c5fb76c14c59d4bf2804443afdaf9c8938de961ac2b6799eef2902ccf69fb959c7
6
+ metadata.gz: 366f914646b492bd8c00f4a4334db6ebb494b447cd54c34ea0d6c47310be1ab7ed3af5662c05daf5bcf8056dbb0899db2848599525ed17859eb40e6b111d500b
7
+ data.tar.gz: 1a21fa7349041d534f29588cb45b9ca41e4e0deef0d6812de0e1384a80613a94667b925b3c32cacf9d6d99bc587807b0419f416a9b6ebe16cb43142d1de13cce
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.3.0] - 2022-01-10
2
+
3
+ - Adds a better world list. From the Wordle source itself : )
4
+
1
5
  ## [0.2.1] - 2022-01-10
2
6
 
3
7
  - Adds legend for colors
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wordle (0.2.1)
4
+ wordle (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Ruby implementation of [Wordle](https://www.powerlanguage.co.uk/wordle/).
4
4
 
5
- <img width="306" alt="Screen Shot 2022-01-09 at 3 38 34 PM" src="https://user-images.githubusercontent.com/22665228/148705881-bb355419-a133-40a2-b853-233ba721be22.png">
5
+ <img width="794" alt="Screen Shot 2022-01-10 at 9 18 19 PM" src="https://user-images.githubusercontent.com/22665228/148885575-39805830-274e-40e6-be14-4c6bc6db37ec.png">
6
6
 
7
7
 
8
8
  ## Installation
@@ -13,8 +13,6 @@ Ruby implementation of [Wordle](https://www.powerlanguage.co.uk/wordle/).
13
13
 
14
14
  Just run `wordle` from the command line.
15
15
 
16
- The word list [leaves something to be desired](https://github.com/JonathanWThom/wordle/issues/1). PRs welcome!
17
-
18
16
  ## Development
19
17
 
20
18
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/lib/wordle/legend.rb CHANGED
@@ -15,15 +15,15 @@ module Wordle
15
15
  private
16
16
 
17
17
  def green_example
18
- "#{'w'.green}eary - The letter w is in the word and in the correct spot."
18
+ "#{"w".green}eary - The letter w is in the word and in the correct spot."
19
19
  end
20
20
 
21
21
  def yellow_example
22
- "p#{'i'.yellow}lls - The letter i is in the word but in the wrong spot."
22
+ "p#{"i".yellow}lls - The letter i is in the word but in the wrong spot."
23
23
  end
24
24
 
25
25
  def gray_example
26
- "vag#{'u'.gray}e - The letter u is not in the word in any spot."
26
+ "vag#{"u".gray}e - The letter u is not in the word in any spot."
27
27
  end
28
28
  end
29
29
  end
data/lib/wordle/list.rb CHANGED
@@ -17,10 +17,7 @@ module Wordle
17
17
  private
18
18
 
19
19
  def list
20
- # fall back to api if this fails?
21
- @_list ||= File.readlines("/usr/share/dict/words").select do |word|
22
- word.strip.length == @length
23
- end.map { |w| w.downcase.strip } # sanitize class to standarize this?
20
+ @_list ||= Wordle::SOURCE
24
21
  end
25
22
  end
26
23
  end