Skip to content

Instantly share code, notes, and snippets.

View jmscholen's full-sized avatar

Jeff Scholen jmscholen

  • IOU Financial
  • Johns Creek
View GitHub Profile
@jmscholen
jmscholen / gist:10267631
Created April 9, 2014 13:02
Testing HW - cell game
require 'rspec'
################creating the world class####################
class World
attr_reader :cells, :cells_with_neighbors, :living_neighbors, :dead_neighbors
def initialize
#@cells = Array.new(10, Array.new(10, Cell.new)) optional method for creating multidimentional array
@cells = Array.new(10) { Array.new(10) {Cell.new}}
end
@jmscholen
jmscholen / horseracing.rb
Last active August 29, 2015 13:58
Horse Racing Game
# Horse Racing Application by Jeff Scholen. Iron Yard Rails Engineering Class 4/3/14
################################HORSE CLASS##################################
class Horse
def initialize
@whisper = 0
@whip = 0
@kick = 0
@jmscholen
jmscholen / personalityquiz.rb
Last active August 29, 2015 13:57
Personality Quiz HW
#personality quiz by jeff scholen. Iron Yard Rails Engineering Class 4/1/2014
#refactored 4/2/2014
multi_user = {}
calm_questions = {question1: "I like living on the Beach.", question2: "I like living in a mountain cabin.", question3: "I prefer a walk on the beach versus going to a bar.", question4: "I like to be alone with my thoughts.", quesiton5: "I prefer working in an office rather than a coffee shop."}
party_questions = {question1: "I like living in the city.", question2: "When staying at a hotel, I prefer staying on the very high floors.", question3: "I like hanging out at a party with lots of people.", question4: "I like owning a high performance car.", question5: "I like working for start-ups rather than a large stable company.", }
5.times{puts " "}
def check_integer_value(value_to_check)
print "#{value_to_check} -- How would you score yourself?"
@jmscholen
jmscholen / guessinggame.rb
Last active August 29, 2015 13:57
Guessing Game HW
#Guessing Game for user to guess the items in the array by Jeff Scholen with user feedback. Iron Yard Rails Engineering 3/31/2014
@n = 0
@atv_values = ["Be Nice.", "Dream Big.", "Pay It Forward.", "Work Hard. Play Hard."]
@atv_guess = ["Be ----.", "----- Big.", "Pay It -------.", "Work-------Play Hard."]
@atv_hints = ["---- guys finish last.", "I have a -----.", "Kevin Spacey, Haley Joel Osment Movie",
"A serious and fun work culture motto." ]
@atv_missing_values = ["nice", "dream", "forward", "hard"]
def match_answer(user_input)
case user_input
@jmscholen
jmscholen / blackjackgame.rb
Last active August 29, 2015 13:57
BlackJack Game
#BlackJack Game created by Jeff Scholen. Iron Yard Rails Engineering Class 3/31/2014
puts "Would you like to play blackjack? Yes or No"
playtime = gets.chomp
exit if playtime.downcase == "no"
my_cards = []
my_cards.push(base_card = rand(10))
puts "Your first card is #{base_card}."