wordle 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5914b5021b2c898710efdb9910e7d4e0f4763ee6f6948748cb8eb333dbc734da
4
- data.tar.gz: 956fee31223a324a258d7e2ea42dda4596950f4395ed2a3a6811267509268919
3
+ metadata.gz: bceb772c3a50a1803ac5c31a26e2e5bed4f513fe3ed3dfcf3e49f1dc81bbe8db
4
+ data.tar.gz: ad55755d24fa6fa2a958f48b4eecec62fc1778174bf387f21ef95b3834e1908e
5
5
  SHA512:
6
- metadata.gz: 407e1b1c701c175929a345e810400a833508804c708d9c59c75336985c382d791513241e56fb7f4e4d776a53e9b00babe3f3a113d662ccaeef0259c9832bd66d
7
- data.tar.gz: 0fe026d67b821cdabdcdb93427a8768149ac20d40bdd732007dd787b713af22f7e67bbb8782d65728b4e5b5079e271fcb3ce62c473bf04d131b0a1edd133112e
6
+ metadata.gz: de15a996681e69b87c62b883acdcb7f75295d96e4eadae1f733af630bc699a8024e3579ee52d110d74c11faa17cb6339500fa884efcb6319119fb5edf15f4bba
7
+ data.tar.gz: b3949c9858e6b02234d74ef791df3acba82334ee0a4dd92bd86fb65c84bbc1c5fb76c14c59d4bf2804443afdaf9c8938de961ac2b6799eef2902ccf69fb959c7
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ## [Unreleased]
1
+ ## [0.2.1] - 2022-01-10
2
+
3
+ - Adds legend for colors
4
+
5
+ ## [0.2.0] - 2022-01-09
6
+
7
+ - Actually tells you what the word was if you don't win!
2
8
 
3
9
  ## [0.1.1] - 2022-01-09
4
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wordle (0.2.0)
4
+ wordle (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  Ruby implementation of [Wordle](https://www.powerlanguage.co.uk/wordle/).
4
4
 
5
- <img width="304" alt="Screen Shot 2022-01-09 at 3 06 39 PM" src="https://user-images.githubusercontent.com/22665228/148704931-dc74bc7a-8987-4ecd-a83d-678e647d20b5.png">
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">
6
+
6
7
 
7
8
  ## Installation
8
9
 
@@ -12,6 +13,8 @@ Ruby implementation of [Wordle](https://www.powerlanguage.co.uk/wordle/).
12
13
 
13
14
  Just run `wordle` from the command line.
14
15
 
16
+ The word list [leaves something to be desired](https://github.com/JonathanWThom/wordle/issues/1). PRs welcome!
17
+
15
18
  ## Development
16
19
 
17
20
  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.
@@ -20,7 +23,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
20
23
 
21
24
  ## Contributing
22
25
 
23
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/wordle. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/wordle/blob/main/CODE_OF_CONDUCT.md).
26
+ Bug reports and pull requests are welcome on GitHub at https://github.com/JonathanWThom/wordle. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/JonathanWThom/wordle/blob/main/CODE_OF_CONDUCT.md).
24
27
 
25
28
  ## License
26
29
 
@@ -28,4 +31,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
28
31
 
29
32
  ## Code of Conduct
30
33
 
31
- Everyone interacting in the Wordle project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/wordle/blob/main/CODE_OF_CONDUCT.md).
34
+ Everyone interacting in the Wordle project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/JonathanWThom/wordle/blob/main/CODE_OF_CONDUCT.md).
data/lib/wordle/game.rb CHANGED
@@ -18,6 +18,7 @@ module Wordle
18
18
  winner = false
19
19
  attempts = 0
20
20
 
21
+ Legend.print
21
22
  puts "Guess a 5 letter word: "
22
23
 
23
24
  while attempts < 6 && !winner
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wordle
4
+ class Legend
5
+ def self.print
6
+ new.print
7
+ end
8
+
9
+ def print
10
+ puts green_example
11
+ puts yellow_example
12
+ puts gray_example
13
+ end
14
+
15
+ private
16
+
17
+ def green_example
18
+ "#{'w'.green}eary - The letter w is in the word and in the correct spot."
19
+ end
20
+
21
+ def yellow_example
22
+ "p#{'i'.yellow}lls - The letter i is in the word but in the wrong spot."
23
+ end
24
+
25
+ def gray_example
26
+ "vag#{'u'.gray}e - The letter u is not in the word in any spot."
27
+ end
28
+ end
29
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wordle
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
data/lib/wordle.rb CHANGED
@@ -5,6 +5,7 @@ require_relative "wordle/version"
5
5
  require_relative "wordle/list"
6
6
  require_relative "wordle/guess_validator"
7
7
  require_relative "wordle/guess_analyzer"
8
+ require_relative "wordle/legend"
8
9
  require_relative "wordle/game"
9
10
 
10
11
  module Wordle
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Thom
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-09 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -35,6 +35,7 @@ files:
35
35
  - lib/wordle/game.rb
36
36
  - lib/wordle/guess_analyzer.rb
37
37
  - lib/wordle/guess_validator.rb
38
+ - lib/wordle/legend.rb
38
39
  - lib/wordle/list.rb
39
40
  - lib/wordle/version.rb
40
41
  - sig/wordle.rbs