Generate the same word for 24 hours

This commit is contained in:
Terry Hearst 2022-02-23 20:36:35 -05:00
parent f59a1e437c
commit fef0b9ef96
2 changed files with 9 additions and 2 deletions

View file

@ -27,7 +27,13 @@ func _ready() -> void:
$C/V/LetterGrid.add_child(letter)
letters.append(letter_array)
target_word = Global.generate_word(letter_count)
var current_time := OS.get_datetime_from_unix_time(OS.get_unix_time())
current_time["hour"] = 0
current_time["minute"] = 0
current_time["second"] = 0
var current_day_unix_time := OS.get_unix_time_from_datetime(current_time)
target_word = Global.generate_word(letter_count, current_day_unix_time)
current_guess = 0

View file

@ -59,7 +59,7 @@ __meta__ = {
margin_right = 500.0
margin_bottom = 82.0
custom_fonts/font = SubResource( 1 )
text = "Gordle"
text = "Daily Gordle"
align = 1
[node name="LetterGrid" type="GridContainer" parent="C/V"]
@ -90,6 +90,7 @@ margin_top = 32.0
margin_right = 500.0
margin_bottom = 83.0
rect_min_size = Vector2( 500, 0 )
size_flags_horizontal = 4
custom_constants/separation = 12
[node name="GuessText" type="LineEdit" parent="C/V/V/H"]