Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Chanel'sUnderworld: https://www.hastebin.com/qomohevoye.cs
- Chanel'sUnderworld: card object
- Chanel'sUnderworld: class name is Card
- Chanel'sUnderworld: https://www.hastebin.com/febuzibawi.java
- Chanel'sUnderworld: Deck class
- Lifespandex: yep
- Chanel'sUnderworld: https://www.hastebin.com/riloqifutu.cs
- Chanel'sUnderworld: Driver class
- Chanel'sUnderworld: i added a tiny bit of functionallity, not much though
- Lifespandex: so i gotta shuffle the deck?
- Chanel'sUnderworld: yes
- Chanel'sUnderworld: you gotta do a lotta things.
- Chanel'sUnderworld: the first one, make me a simple blackjack game.
- Lifespandex: alright
- 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.
- Chanel'sUnderworld: i can see the SECOND card he's dealt, the first is facedown.
- Chanel'sUnderworld: i can choose to type 'hit' or 'stand'.
- Chanel'sUnderworld: if i choose hit, im given a new card. if my hand exceeds 21, i lose my chips.
- Lifespandex: and you can only hit 3 times, max 5 cards
- Chanel'sUnderworld: this goes on until i stand. then i compare hands with the dealer.
- Chanel'sUnderworld: no, you can hit forever.
- Lifespandex: alright
- Lifespandex: just cmd line?
- Chanel'sUnderworld: yes.
- Lifespandex: k
- Chanel'sUnderworld: make it nice though...for instance, [K] is much prettier than [king of diamonds]
- Chanel'sUnderworld: [A][Q] is easy to read.
- Chanel'sUnderworld: [X][4] if its the dealer for instance.
- Lifespandex: yep
- Lifespandex: what about suits?
- Chanel'sUnderworld: that's a design decision.
- Lifespandex: alright
- Chanel'sUnderworld: also, kinds, queens, jacks have a value of 10
- Chanel'sUnderworld: ace has a value of 11 until you bust. then it has a value of 1.
- Chanel'sUnderworld: i'd create a hand class if i were you. use that to keep track of hands.
- Lifespandex: alright
- Chanel'sUnderworld: also think of all the edge cases.
- Lifespandex: edge cases?
- Chanel'sUnderworld: whenever you plan something out in compsci there's different ways something could go
- Chanel'sUnderworld: edge cases = weird shit
- Chanel'sUnderworld: an edge case would be you getting blackjack on initial deal.
- 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.
- Lifespandex: ok
- Chanel'sUnderworld: 21 = cards add up to 21. blackjack = cards add up to 21 AND you only have 2 cards
- Lifespandex: yep
- Chanel'sUnderworld: if the bank class had your current chips, it can also have a pot variable.
- 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
- Chanel'sUnderworld: ya
- Lifespandex: alright cool
- Lifespandex: thx
- 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())"
- Lifespandex: alright cool
- 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)
- Chanel'sUnderworld: anyway, message me if you need any more hints
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement