Skip to content

Instantly share code, notes, and snippets.

@brandoncc
Created July 6, 2014 16:12
Show Gist options
  • Save brandoncc/388b7262a12a0a2fded4 to your computer and use it in GitHub Desktop.
Save brandoncc/388b7262a12a0a2fded4 to your computer and use it in GitHub Desktop.
BlackJack_Procedural ➤ ruby blackjack.rb
Hello, Welcome to Lucky Larry's BlackJack....feeling lucky?
Player goes first
Press [ENTER]
--------------------------------------------------
--------------------------------------------------
You drew a J of clubs!
--------------------------------------------------
Your score is 10! [ENTER]
Would you like to hit again?(y/n)
y
--------------------------------------------------
You drew a 9 of diamonds!
--------------------------------------------------
Your score is 19! [ENTER]
n
Would you like to hit again?(y/n)
n
--------------------------------------------------
Dealer drew a J of diamonds!
Dealer score is now: 10 [ENTER]
--------------------------------------------------
Dealer drew a K of spades!
Dealer score is now: 20 [ENTER]
--------------------------------------------------
SCORES Before last hit!
Player Score: 19 Dealer Score: 20 [ENTER]
Would you like to hit again?(y/n)
n
Sorry, DEALER WINS...
Better luck next time! [ENTER]
SCORES
Player Score: 19 Dealer Score: 20
BlackJack_Procedural ➤ ruby blackjack.rb
Hello, Welcome to Lucky Larry's BlackJack....feeling lucky?
Player goes first
Press [ENTER]
--------------------------------------------------
--------------------------------------------------
You drew a 5 of diamonds!
--------------------------------------------------
Your score is 5! [ENTER]
Would you like to hit again?(y/n)
y
--------------------------------------------------
You drew a 4 of diamonds!
--------------------------------------------------
Your score is 9! [ENTER]
Would you like to hit again?(y/n)
y
--------------------------------------------------
You drew a 10 of clubs!
--------------------------------------------------
Your score is 19! [ENTER]
Would you like to hit again?(y/n)
n
--------------------------------------------------
Dealer drew a 3 of clubs!
Dealer score is now: 3 [ENTER]
--------------------------------------------------
Dealer drew a Q of clubs!
Dealer score is now: 13 [ENTER]
--------------------------------------------------
Dealer drew a 8 of hearts!
Dealer score is now: 21 [ENTER]
Sorry, DEALER WINS...
Better luck next time! [ENTER]
SCORES
Player Score: 19 Dealer Score: 21
BlackJack_Procedural ➤ ruby blackjack.rb
Hello, Welcome to Lucky Larry's BlackJack....feeling lucky?
Player goes first
Press [ENTER]
--------------------------------------------------
--------------------------------------------------
You drew a 8 of spades!
--------------------------------------------------
Your score is 8! [ENTER]
Would you like to hit again?(y/n)
n
--------------------------------------------------
Dealer drew a Q of spades!
Dealer score is now: 10 [ENTER]
--------------------------------------------------
Dealer drew a 2 of diamonds!
Dealer score is now: 12 [ENTER]
--------------------------------------------------
Dealer drew a 10 of diamonds!
Dealer score is now: 22 [ENTER]
Dealer busts!
PLAYER WINS!!!! [ENTER]
SCORES
Player Score: 8 Dealer Score: 22
BlackJack_Procedural ➤ ruby blackjack.rb
Hello, Welcome to Lucky Larry's BlackJack....feeling lucky?
Player goes first
Press [ENTER]
--------------------------------------------------
--------------------------------------------------
You drew a 3 of clubs!
--------------------------------------------------
Your score is 3! [ENTER]
n
Would you like to hit again?(y/n)
n
--------------------------------------------------
Dealer drew a 8 of diamonds!
Dealer score is now: 8 [ENTER]
--------------------------------------------------
Dealer drew a 8 of hearts!
Dealer score is now: 16 [ENTER]
--------------------------------------------------
SCORES Before last hit!
Player Score: 3 Dealer Score: 16 [ENTER]
Would you like to hit again?(y/n)
y
--------------------------------------------------
You drew a 4 of clubs! [ENTER]
--------------------------------------------------
Sorry, DEALER WINS...
Better luck next time! [ENTER]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment