{"action":"closed","issue":{"url":"https://api.github.com/repos/digitaldrk/assignments/issues/4","labels_url":"https://api.github.com/repos/digitaldrk/assignments/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/digitaldrk/assignments/issues/4/comments","events_url":"https://api.github.com/repos/digitaldrk/assignments/issues/4/events","html_url":"https://github.com/digitaldrk/assignments/issues/4","id":74039886,"number":4,"title":"Assignment 1-4","user":{"login":"ambethia","id":298,"avatar_url":"https://avatars.githubusercontent.com/u/298?v=3","gravatar_id":"","url":"https://api.github.com/users/ambethia","html_url":"https://github.com/ambethia","followers_url":"https://api.github.com/users/ambethia/followers","following_url":"https://api.github.com/users/ambethia/following{/other_user}","gists_url":"https://api.github.com/users/ambethia/gists{/gist_id}","starred_url":"https://api.github.com/users/ambethia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambethia/subscriptions","organizations_url":"https://api.github.com/users/ambethia/orgs","repos_url":"https://api.github.com/users/ambethia/repos","events_url":"https://api.github.com/users/ambethia/events{/privacy}","received_events_url":"https://api.github.com/users/ambethia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"digitaldrk","id":4297274,"avatar_url":"https://avatars.githubusercontent.com/u/4297274?v=3","gravatar_id":"","url":"https://api.github.com/users/digitaldrk","html_url":"https://github.com/digitaldrk","followers_url":"https://api.github.com/users/digitaldrk/followers","following_url":"https://api.github.com/users/digitaldrk/following{/other_user}","gists_url":"https://api.github.com/users/digitaldrk/gists{/gist_id}","starred_url":"https://api.github.com/users/digitaldrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitaldrk/subscriptions","organizations_url":"https://api.github.com/users/digitaldrk/orgs","repos_url":"https://api.github.com/users/digitaldrk/repos","events_url":"https://api.github.com/users/digitaldrk/events{/privacy}","received_events_url":"https://api.github.com/users/digitaldrk/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-05-07T16:08:37Z","updated_at":"2015-05-11T19:59:29Z","closed_at":"2015-05-11T19:59:29Z","body":"## Week 1 - Assignment #4\r\n\r\n### Description\r\n\r\nCreate a Blackjack console game.\r\n\r\n## Objectives\r\n\r\n### Learning Objectives\r\n\r\nAfter completing this assignment, you should be able to:\r\n\r\n* Use control-flow (having the computer make decisions).\r\n* Create a user interface.\r\n* Use data-flow (your deck is a unique set of resources).\r\n\r\n### Performance Objectives\r\n\r\nAfter completing this assignment, you be able to effectively use:\r\n\r\n* Classes\r\n* Arrays\r\n* Console / Terminal\r\n\r\n### Deliverables\r\n\r\n* A repo containing at least:\r\n\r\n  - [x] `blackjack.rb` -- your game. This is file you'll run with `ruby blackjack.rb`.\r\n  - [x] `card.rb` -- your `Card` class\r\n  - [x] `deck.rb` -- your `Deck` class\r\n\r\nTo submit your assignment:\r\n\r\n* Submit a link to your repository here as a comment on this Issue and close it out.\r\n\r\n### Requirements\r\n\r\n- [x] Don't consider Aces as possible 1s they are always 11s.\r\n- [x] This is a two hand game (dealer and player).\r\n- [x] No splitting or any funny business like that.\r\n- [x] One deck in the game.\r\n- [x] 52 card deck.\r\n- [x] No \"wild\" cards.\r\n- [x] Create a new deck every game.\r\n- [x] Deck must be shuffled every game.\r\n- [x] No betting.\r\n- [x] Must have suits (Ace of Diamonds).\r\n- [x] Dealer hits if less than 16, otherwise dealer stays.\r\n- [x] Player inputs if they want to stay or hit.\r\n- [x] Get as close to 21 without going over.\r\n- [ ] Player beat the dealer to win.\r\n- [x] You can see 1 of dealers cards, while you are playing.\r\n\r\n## Bonus\r\n\r\n- [x] If you get blackjack (21 with two cards), you win automagically.\r\n- [x] If the dealer gets blackjack, you lose.\r\n- [ ] Add the idea of tracking your progress as you play over time.\r\n- [ ] Let the player choose if an Ace is a 1 or an 11\r\n\r\n## Notes\r\n\r\nThis can be fairly challenging, and may involve researching things we haven't touched on in class.\r\n\r\nA helpful snippet of code, to give you an idea of how you might build a deck:\r\n\r\n```ruby\r\n# ... snip\r\nsuits = [:hearts, :diamonds, :spades, :clubs]\r\nsuits.each do |suit|\r\n  (2..10).each do |value|\r\n    @cards << Card.new(suit, value)\r\n  end\r\n  @cards << Card.new(suit, \"J\")\r\n  @cards << Card.new(suit, \"Q\")\r\n  @cards << Card.new(suit, \"K\")\r\n  @cards << Card.new(suit, \"A\")\r\nend\r\n# ... snip\r\n```\r\n\r\nYou 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.\r\n\r\n## Additional Resources\r\n\r\n* [Play Blackjack](http://freeblackjackdoc.com/blackjack-game.htm)  \r\n* [Info on Blackjack](https://en.wikipedia.org/wiki/Blackjack)\r\n"}}