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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -3
- data/lib/wordle/legend.rb +3 -3
- data/lib/wordle/list.rb +1 -4
- data/lib/wordle/source.rb +12978 -0
- data/lib/wordle/version.rb +1 -1
- data/lib/wordle.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff0c43c46f9e5e2e25088128a3cd8e2f634bda564b98a0b36473c0d9fb1a25b7
|
4
|
+
data.tar.gz: bbcaf825639fd41c6388b501388cc108048d1c4464e59a3cad7eaa2451586679
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366f914646b492bd8c00f4a4334db6ebb494b447cd54c34ea0d6c47310be1ab7ed3af5662c05daf5bcf8056dbb0899db2848599525ed17859eb40e6b111d500b
|
7
|
+
data.tar.gz: 1a21fa7349041d534f29588cb45b9ca41e4e0deef0d6812de0e1384a80613a94667b925b3c32cacf9d6d99bc587807b0419f416a9b6ebe16cb43142d1de13cce
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
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="
|
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
|
-
"#{
|
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#{
|
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#{
|
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
|
-
|
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
|