glimmer_wordle 1.1.3 → 1.1.4
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 +4 -4
- data/README.md +15 -1
- data/VERSION +1 -1
- data/app/wordle/view/app_view.rb +13 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3539bd2cf55a25f67c820dd8b88d7407e4aa9778467151b82601dd7a62abb1b0
|
4
|
+
data.tar.gz: c72fc25a119fd620979585ec9ad797f584b242556981736fe3c2a043f71e0103
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb7ec3a1b241e41d18f31bac1b6f9a9064a54c30fe405f2624c35f09cb26422f667a73cbcd4fba67db57be3bb4949e7feb994d9987341954d398915a9d13ba74
|
7
|
+
data.tar.gz: ae2378a3c8eef3c5a95a0fb2e1c1a42a6f0a623901575ad1bedb35ad8eccd273b32f7019f7ba2d62092a8809bc74e5b50b5ca4f8ee3f4c8d770669030e1f8760
|
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer_wordle/master/icons/linux/Glimmer Wordle.png' height=85 /> Glimmer Wordle 1.1.
|
1
|
+
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer_wordle/master/icons/linux/Glimmer Wordle.png' height=85 /> Glimmer Wordle 1.1.4
|
2
2
|
## Play Wordle Endlessly with No Limit!
|
3
3
|
[](http://badge.fury.io/rb/glimmer_wordle)
|
4
4
|
|
5
5
|
[Wordle](https://en.wikipedia.org/wiki/Wordle) word game desktop GUI app written [test-first](https://github.com/AndyObtiva/wordle/blob/master/spec/app/model/five_letter_word_spec.rb) using [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Framework) as inspiration by [Kevin Newton's blog post](https://kddnewton.com/2022/01/29/solving-wordle-in-ruby.html).
|
6
6
|
|
7
|
+
(Since the desktop version can leverage a real keyboard, there is no need to display the alphabets following the Qwerty layout, so they are displayed alphabetically to enable a more user-friendly experience, but the Qwerty layout is available as an [option](#options) if desired.)
|
8
|
+
|
7
9
|
Mac | Linux
|
8
10
|
----|------
|
9
11
|
 | 
|
@@ -48,6 +50,18 @@ Afterwards, run:
|
|
48
50
|
glimmer_wordle
|
49
51
|
```
|
50
52
|
|
53
|
+
## Options
|
54
|
+
|
55
|
+
The game menu bar has these View menu options:
|
56
|
+
|
57
|
+
1- **View -> Alphabet Layout -> Alphabetical**: Displays alphabets alphabetically
|
58
|
+
|
59
|
+

|
60
|
+
|
61
|
+
2- **View -> Alphabet Layout -> Qwerty**: Displays alphabets with the Qwerty keyboard layout
|
62
|
+
|
63
|
+

|
64
|
+
|
51
65
|
## Process
|
52
66
|
|
53
67
|
[Glimmer Process](https://github.com/AndyObtiva/glimmer/blob/master/PROCESS.md)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
data/app/wordle/view/app_view.rb
CHANGED
@@ -176,7 +176,7 @@ class Wordle
|
|
176
176
|
|
177
177
|
If you enter a letter that is part of the word, but at the wrong location, it becomes yellow.
|
178
178
|
|
179
|
-
If you enter a letter that is not part of the word, it
|
179
|
+
If you enter a letter that is not part of the word, it becomes red.
|
180
180
|
MULTI_LINE_STRING
|
181
181
|
}.open
|
182
182
|
end
|
@@ -300,12 +300,16 @@ class Wordle
|
|
300
300
|
end
|
301
301
|
|
302
302
|
def do_backspace
|
303
|
-
@letter = @letters
|
304
|
-
|
305
|
-
|
303
|
+
@letter = @letters[highlighted_letter_index]
|
304
|
+
if @letter.string != ''
|
305
|
+
index_to_delete = highlighted_letter_index
|
306
|
+
else
|
307
|
+
index_to_delete = [highlighted_letter_index - 1, 0].max
|
308
|
+
end
|
309
|
+
@letter = @letters[index_to_delete]
|
306
310
|
@letter.string = ''
|
307
|
-
@borders.each { |caret| caret.foreground = :gray}
|
308
|
-
@borders[
|
311
|
+
@borders.each { |caret| caret.foreground = :gray} # refactor this reusable code into a method that highlights the caret
|
312
|
+
@borders[index_to_delete].foreground = :title_background
|
309
313
|
end
|
310
314
|
|
311
315
|
def do_guess
|
@@ -355,20 +359,20 @@ class Wordle
|
|
355
359
|
@letter = @letters[index]
|
356
360
|
@letter.string = character.upcase
|
357
361
|
if @letters.any? {|letter| letter.string == ''}
|
358
|
-
@borders.each { |caret| caret.foreground = :gray}
|
362
|
+
@borders.each { |caret| caret.foreground = :gray} # refactor this reusable code into a method that highlights the caret
|
359
363
|
@borders[index == 4 ? 4 : index + 1].foreground = :title_background
|
360
364
|
end
|
361
365
|
end
|
362
366
|
|
363
367
|
def do_left
|
364
368
|
index = [highlighted_letter_index - 1, 0].max
|
365
|
-
@borders.each { |caret| caret.foreground = :gray}
|
369
|
+
@borders.each { |caret| caret.foreground = :gray} # refactor this reusable code into a method that highlights the caret
|
366
370
|
@borders[index].foreground = :title_background
|
367
371
|
end
|
368
372
|
|
369
373
|
def do_right
|
370
374
|
index = [highlighted_letter_index + 1, @letters.count - 1].min
|
371
|
-
@borders.each { |caret| caret.foreground = :gray}
|
375
|
+
@borders.each { |caret| caret.foreground = :gray} # refactor this reusable code into a method that highlights the caret
|
372
376
|
@borders[index].foreground = :title_background
|
373
377
|
end
|
374
378
|
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer_wordle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 4.
|
18
|
+
version: 4.26.0.1
|
19
19
|
name: glimmer-dsl-swt
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.
|
26
|
+
version: 4.26.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|