Skip to content

Instantly share code, notes, and snippets.

View TaylorOD's full-sized avatar
😀
pushin code

Taylor Dorsett TaylorOD

😀
pushin code
View GitHub Profile
@TaylorOD
TaylorOD / TIL.md
Last active January 10, 2021 19:25
Today I learned...
@TaylorOD
TaylorOD / Hangman.rb
Created August 4, 2020 17:05 — forked from JDLeigh10/Hangman.rb
Hangman game created in Ruby
# Load the dictionary, store it in an array, shuffle it
dictionary = File.open('dictionary.txt')
dictionary_array = dictionary.readlines
dictionary_array.shuffle!
# Intro text, wait for user to type 'start'
puts "\n<<< Terminal Hangman >>>\n\n"
puts "Type \"start\" to begin a new game\n"
turn = 0
rematch = nil
@TaylorOD
TaylorOD / fizzbuzz.rb
Created August 4, 2020 17:04 — forked from Kerrick/fizzbuzz.rb
Different solutions for Fizz Buzz in Ruby
def fizz_buzz_1(max)
arr = []
(1..max).each do |n|
if ((n % 3 == 0) && (n % 5 == 0))
arr << "FizzBuzz"
elsif (n % 3 == 0)
arr << "Fizz"
elsif (n % 5 == 0)
arr << "Buzz"
else