Skip to content

Instantly share code, notes, and snippets.

View trivett's full-sized avatar
🚲
Bikes + JavaScript

Vincent trivett

🚲
Bikes + JavaScript
View GitHub Profile
@trivett
trivett / numberwang.rb
Created February 27, 2014 16:09
this is numberwang!
# http://www.youtube.com/watch?v=qjOZtWZ56lc
class Numeric
def is_numberwang?
rand(5) == 0
end
end
i = 0
def play(i)
while i < 2
@trivett
trivett / vocabquiz.rb
Created November 29, 2013 18:30
Command line program for testing your counting in a foreign language. Feel free to add a new language and build up the total list of words as far as desired. Want to throw in Swedish? Have at it. Care to add numbers up to 100 in French? Just put them in order.
puts "Welcome to the Number Vocabulary Test Program"
puts "A simple program for learning your numbers in a foreign language."
words = {
"Japanese" => ['zero','ichi','ni','san','yon','go','roku','shichi','hachi','kyuu','juu','juuichi','juuni','juusan'],
"Spanish" => ['cero','uno','dos','tres','cuatro','cinco','seis','siete','ocho','nueve','diez'],
"German" => ['null','eins','zwei','drei','vier','funf','sechs','sieben','acht','neun', 'zehn']
}
def play(words)