Skip to content

Instantly share code, notes, and snippets.

View marcoroman89's full-sized avatar

Marco Roman marcoroman89

View GitHub Profile
@marcoroman89
marcoroman89 / gist:6035080
Last active December 19, 2015 23:29
Object Orientated Ruby Blackjack app
class Card
attr_accessor :suit, :face_value
def initialize(s, fv)
@suit = s
@face_value = fv
end
def pretty_output
"The #{face_value} of #{find_suit}"
@marcoroman89
marcoroman89 / gist:6035058
Created July 19, 2013 04:01
Procedural Ruby Blackjack app
puts "****************************"
puts "Welcome to Ruby Blackjack!"
puts "****************************"
puts ""
# Deck and Suit
suits = ['Diamonds', 'Spades', 'Hearts', 'Clubs']
cards = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'King', 'Queen', 'Ace']