Last active
February 7, 2024 14:55
-
-
Save adaball/f678077559e037f7c7361770e8b2d83b to your computer and use it in GitHub Desktop.
The Most Important Ruby Script ™️
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 | |
# Generate a random D&D alignment. | |
ethic = ['lawful', 'neutral', 'chaotic'] | |
moral = ['good', 'neutral', 'evil'] | |
r = Random.new | |
e = ethic[r.rand(3)] | |
m = moral[r.rand(3)] | |
if e == m | |
e = 'true' | |
end | |
puts "#{e.capitalize} #{m.capitalize}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment