Created
February 24, 2022 12:42
-
-
Save j16r/5d511e2b0b2ab66e71015b8a37f0d72d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'date' | |
day = (Date.today - Date.civil(2021, 6, 19)).to_i | |
won = rand(5)+1 | |
puts "Wordle #{day} #{won}/6" | |
tiles = ['🟩','🟨','⬛️'] | |
(1..won-1).each do |row| | |
puts "#{5.times.collect { tiles.sample }.join}\n" | |
end | |
puts "#{tiles[0]*5}\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment