Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1.  
  2. Chanel'sUnderworld: https://www.hastebin.com/qomohevoye.cs
  3. Chanel'sUnderworld: card object
  4. Chanel'sUnderworld: class name is Card
  5. Chanel'sUnderworld: https://www.hastebin.com/febuzibawi.java
  6. Chanel'sUnderworld: Deck class
  7. Lifespandex: yep
  8. Chanel'sUnderworld: https://www.hastebin.com/riloqifutu.cs
  9. Chanel'sUnderworld: Driver class
  10. Chanel'sUnderworld: i added a tiny bit of functionallity, not much though
  11. Lifespandex: so i gotta shuffle the deck?
  12. Chanel'sUnderworld: yes
  13. Chanel'sUnderworld: you gotta do a lotta things.
  14. Chanel'sUnderworld: the first one, make me a simple blackjack game.
  15. Lifespandex: alright
  16. Chanel'sUnderworld: i wanna be able to place a bet using my current money stack. then im deal 2 cards, faceup. the dealer also gets a hand.
  17. Chanel'sUnderworld: i can see the SECOND card he's dealt, the first is facedown.
  18. Chanel'sUnderworld: i can choose to type 'hit' or 'stand'.
  19. Chanel'sUnderworld: if i choose hit, im given a new card. if my hand exceeds 21, i lose my chips.
  20. Lifespandex: and you can only hit 3 times, max 5 cards
  21. Chanel'sUnderworld: this goes on until i stand. then i compare hands with the dealer.
  22. Chanel'sUnderworld: no, you can hit forever.
  23. Lifespandex: alright
  24. Lifespandex: just cmd line?
  25. Chanel'sUnderworld: yes.
  26. Lifespandex: k
  27. Chanel'sUnderworld: make it nice though...for instance, [K] is much prettier than [king of diamonds]
  28. Chanel'sUnderworld: [A][Q] is easy to read.
  29. Chanel'sUnderworld: [X][4] if its the dealer for instance.
  30. Lifespandex: yep
  31. Lifespandex: what about suits?
  32. Chanel'sUnderworld: that's a design decision.
  33. Lifespandex: alright
  34. Chanel'sUnderworld: also, kinds, queens, jacks have a value of 10
  35. Chanel'sUnderworld: ace has a value of 11 until you bust. then it has a value of 1.
  36. Chanel'sUnderworld: i'd create a hand class if i were you. use that to keep track of hands.
  37. Lifespandex: alright
  38. Chanel'sUnderworld: also think of all the edge cases.
  39. Lifespandex: edge cases?
  40. Chanel'sUnderworld: whenever you plan something out in compsci there's different ways something could go
  41. Chanel'sUnderworld: edge cases = weird shit
  42. Chanel'sUnderworld: an edge case would be you getting blackjack on initial deal.
  43. Chanel'sUnderworld: typically, you win when you get 21. but if the dealer got blackjack too, you tie. but that only applies if the dealer gets blackjack, not just 21.
  44. Lifespandex: ok
  45. Chanel'sUnderworld: 21 = cards add up to 21. blackjack = cards add up to 21 AND you only have 2 cards
  46. Lifespandex: yep
  47.  
  48.  
  49. Chanel'sUnderworld: if the bank class had your current chips, it can also have a pot variable.
  50. Chanel'sUnderworld: when you win a hand, pot is doubled and returned to current chips. when you lose, nothing happens, when you tie you get your initial bet back
  51. Chanel'sUnderworld: ya
  52. Lifespandex: alright cool
  53. Lifespandex: thx
  54. Chanel'sUnderworld: hand class needs an arraylist of cards. you need an addToHand(Card c) method in there. and in the Driver program, you'd call it like "playerHand.addToHand(deck.deal())"
  55. Lifespandex: alright cool
  56. Chanel'sUnderworld: hand also needs to evaluate hand and figure out whether any aces are there and if you bust, manipulate the values of the aces to bump it down to 1 (from 11)
  57. Chanel'sUnderworld: anyway, message me if you need any more hints
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement