This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
christophersair:~ Chris$ git --version | |
git version 1.8.5.2 (Apple Git-48) | |
christophersair:~ Chris$ which git | |
/usr/bin/git | |
christophersair:~ Chris$ |
NewerOlder