bristolkr / assignments

TIY homework, mostly basic Ruby files from first week
0 stars 0 forks source link

Assignment 1-4 #8

Closed ambethia closed 9 years ago

ambethia commented 9 years ago

Week 1 - Assignment #4

Description

Create a Blackjack console game.

Objectives

Learning Objectives

After completing this assignment, you should be able to:

After completing this assignment, you be able to effectively use:

To submit your assignment:

This can be fairly challenging, and may involve researching things we haven't touched on in class.

A helpful snippet of code, to give you an idea of how you might build a deck:

# ... snip
suits = [:hearts, :diamonds, :spades, :clubs]
suits.each do |suit|
  (2..10).each do |value|
    @cards << Card.new(suit, value)
  end
  @cards << Card.new(suit, "J")
  @cards << Card.new(suit, "Q")
  @cards << Card.new(suit, "K")
  @cards << Card.new(suit, "A")
end
# ... snip

You don't have to use this snippet directly (and maybe you shouldn't). Also remember you can work together and help each other. Just try not to copy-pasta a solution from The Internet and do not turn in anything that you don't understand.

Additional Resources