{"action":"created","issue":{"url":"https://api.github.com/repos/Dmo582251/blackJack_game-WDI-Project-1/issues/2","labels_url":"https://api.github.com/repos/Dmo582251/blackJack_game-WDI-Project-1/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Dmo582251/blackJack_game-WDI-Project-1/issues/2/comments","events_url":"https://api.github.com/repos/Dmo582251/blackJack_game-WDI-Project-1/issues/2/events","html_url":"https://github.com/Dmo582251/blackJack_game-WDI-Project-1/issues/2","id":91248274,"number":2,"title":"issue with Deal and hit button","user":{"login":"Dmo582251","id":8561114,"avatar_url":"https://avatars.githubusercontent.com/u/8561114?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmo582251","html_url":"https://github.com/Dmo582251","followers_url":"https://api.github.com/users/Dmo582251/followers","following_url":"https://api.github.com/users/Dmo582251/following{/other_user}","gists_url":"https://api.github.com/users/Dmo582251/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmo582251/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmo582251/subscriptions","organizations_url":"https://api.github.com/users/Dmo582251/orgs","repos_url":"https://api.github.com/users/Dmo582251/repos","events_url":"https://api.github.com/users/Dmo582251/events{/privacy}","received_events_url":"https://api.github.com/users/Dmo582251/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-26T13:18:20Z","updated_at":"2015-06-26T13:24:24Z","closed_at":null,"body":"WHAT USER STORY YOU ARE WORKING ON:\r\n\r\nI am working on the user story \"when user clicks on hit and deal\"\r\n\r\nWHAT YOU ARE TRYING TO DO:\r\n\r\nI am trying to have the card value shown when the dealer deals. / value of third card is added when hit\r\n\r\nDETAILED DESCRIPTION OF THE BUG/ERROR:\r\ndealer and player have the same cards right now.. dont know when that happened\r\nhit value is not adding\r\n\r\nWHAT I'VE TRIED\r\nI've used debug to print out the object\r\n i tried switching up my code \r\ntried making a new function just for hit getting value\r\n\r\nI did update in the rails console, but it worked fine, and the changes showed up on the view.\r\n\r\n\r\nQUESTION\r\n\r\nWhy do my player and dealer have the same card when they are not the same\r\nhow come my hit function for player not working when i even made a new function just so it can be added?\r\n\r\n@awongh @pavankat @DBrodsky90 @WilliamfShaw \r\n"},"comment":{"url":"https://api.github.com/repos/Dmo582251/blackJack_game-WDI-Project-1/issues/comments/115683133","html_url":"https://github.com/Dmo582251/blackJack_game-WDI-Project-1/issues/2#issuecomment-115683133","issue_url":"https://api.github.com/repos/Dmo582251/blackJack_game-WDI-Project-1/issues/2","id":115683133,"user":{"login":"Dmo582251","id":8561114,"avatar_url":"https://avatars.githubusercontent.com/u/8561114?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmo582251","html_url":"https://github.com/Dmo582251","followers_url":"https://api.github.com/users/Dmo582251/followers","following_url":"https://api.github.com/users/Dmo582251/following{/other_user}","gists_url":"https://api.github.com/users/Dmo582251/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmo582251/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmo582251/subscriptions","organizations_url":"https://api.github.com/users/Dmo582251/orgs","repos_url":"https://api.github.com/users/Dmo582251/repos","events_url":"https://api.github.com/users/Dmo582251/events{/privacy}","received_events_url":"https://api.github.com/users/Dmo582251/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T13:24:24Z","updated_at":"2015-06-26T13:24:24Z","body":"// DEAL BUTTON\r\nvar Dealer = function() {\r\n  this.deck = new Deck();\r\n  this.hand = new Hand();\r\n  this.handValue = 0;\r\n  this.stay = true;\r\n\r\n  this.deal = function(randomCard){\r\n\r\n    //pushing cards into dealer hand\r\n    this.hand.hand.push(randomCard);\r\n    this.hand.getValue();\r\n    console.log(this.hand.value);\r\n\r\n    //pushes cards into players hand\r\n    player.hand.hand.push(randomCard);\r\n    player.hand.getValue();\r\n    console.log(\"cards have been added to dealer and players hands\");\r\n  };\r\n\r\n///DEAL BUTTON\r\nvar dealButton = $('#deal')\r\n\t\tdealButton.text(\"Deal\");\r\n\t\tdealButton.click(function(){\r\n\t\t\tdealer.deal(deck.getRandomCard());\r\n\t\t\tdealer.deal(deck.getRandomCard());\r\n\t\t\r\n\t\t//Showing player card values\r\n\t\tvar playerCardValue = $(\"#playerCardValue\");\r\n\t\t\t//DOESNT WORK(playerCardValue.player.hand.hand.value);\r\n\t\tvar playerCard1 = $(\"#playerCard1\");\r\n\t\t\t//DOESNT WORKplayerCard1.text(player.hand.hand[0].value);\r\n\t\tvar playerCard2 = $(\"#playerCard2\");\r\n\t\t\t//DOESNT WORKplayerCard1.text(player.hand.hand[0].value);\r\n\t\t\r\n\t\t\r\n\r\n\t\t//Showing dealer card values\r\n\t\tvar dealerCardValue =$(\"#dealerCardValue\");\r\n\t\t\t(dealerCardValue.dealer.hand.hand.value);\r\n\t\tvar dealerCard1 = $(\"#dealerCard1\");\r\n\t\t\tdealerCard1.text(dealer.hand.hand[0].value);\r\n\t\tvar dealerCard2 = $(\"#dealerCard2\")\r\n\t\t\tdealerCard2.text(dealer.hand.hand[1].value);\r\n\t\t});"}}