Skip to content

Instantly share code, notes, and snippets.

@ckib16
ckib16 / gist:d4bd44c56b9e8d1f8384
Created September 1, 2014 20:41
Problems with .pop method
# blackjack_oop.rb
# Requirements
# - Dealer has a deck of cards. The cards are shuffled and dealt to the Dealer and Player. The player and dealer calculate their hands. If dealer has 21, game is over. If player has 21, player wins. If both have 21, they tie (push). If neither, play continues
# If play continues, player is asked to hit or stay. If player hits, new card is dealt and new caluclation made for <21, ==21 or >21. If <21, player can hit or stay. If ==21, player wins or ties is dealer aslo has 21. If >21 player loses.
# If player stays, dealer takes turn. Dealer must hit if <=16, and wil stay at >=17. If dealer, busts, palyer wins. If dealer stays at >= 17 and does not bust, compare score to player. Player with higher score wins. Game resets.
# Major nouns:
@ckib16
ckib16 / gist:b4296a7954604ced6368
Created August 3, 2014 02:44
TicTacToe errors
#Psuedo code
#Draw a playing field
# Get input from the player for an X to go in spaces #1-9
# Store input in a Hash with spaces #1-9 and either X or O???
# Map puts lines to each section of chart?
# Place X in space input by player
# Place O in a space not yet used by player
# Keep past choices displayed and ask user for another input (????)
# Keep going until player or computer has 3 marks in a row (Payer/Computer wins)
# OR board is filled (Tie)
@ckib16
ckib16 / gist:845e89017c0151b724b8
Created July 20, 2014 18:34
Git version still shows old 1.8.5.2 after installing git 2.0.1
christophersair:~ Chris$ git --version
git version 1.8.5.2 (Apple Git-48)
christophersair:~ Chris$ which git
/usr/bin/git
christophersair:~ Chris$