Giter Site home page Giter Site logo

tiy-lab-two's Introduction

The Iron Yard - Week Two Lab: Blackjack

Description

Blackjack Ruby console game

Objectives

Learning Objectives

After completing this assignment, you should…

  • Use control-flow (having the computer make decisions)
  • Create a user interface
  • Use data-flow (your deck is a unique set of resources)

Performance Objectives

After completing this assignment, you be able to effectively use

  • Classes
  • Arrays
  • Console / Terminal

Details

Code you may want

#... 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

Deliverables

  • A repo containing at least:
    • blackjack.rb : your game class
    • card.rb : your Card class
    • deck.rb : your Deck class

To submit your assignment:

  • Create a gist, with 1 file per class
  • Submit a link to it to this gist as a GitHub Issue here

Requirements

  • You should create classes for your data, and use methods instead of having one big loop
  1. don't consider Aces as possible 1's ... they are always 11s
  2. This is a 2 hand game (dealer and player)
  3. no splitting or funny business
  4. 1 deck in the game
  5. 52 card deck
  6. NO WILDS
  7. New deck every game
  8. deck must be shuffled every game
  9. no betting at all
  10. must have suits (ace of diamonds)
  11. Dealer hits if less than 16, otherwise dealer stays
  12. You enter what you play
  13. No if you get 5 cards you win funnybusiness
  14. get as close to 21 without going over
  15. Must beat the dealer
  16. you can see 1 of dealers cards, while you are playing
  17. If you get blackjack, you win automagically

Additional Resources

tiy-lab-two's People

Contributors

bryanhouston avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.