Advertisement
Guest User

Untitled

a guest
Jun 28th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. namespace Blackjack
  2. {
  3. class Hand
  4. Cards cards;
  5. class Card
  6. int number;
  7. typeOfCard hearts, etc...;
  8. interface Dealer
  9. interface Player
  10.  
  11. class Round
  12. List<Player> players;
  13. Dealer dealer;
  14.  
  15. // Those next two aren't probably correct. I'd need to do TDD and check how exactly to implement this
  16. clss User implements Player
  17. clss DealerAI implements Dealer
  18.  
  19. class GameLogic
  20. {
  21.  
  22. }
  23.  
  24. class or interface Rule
  25. class method:
  26. abstract appliesTo(Hand hand)
  27. instance method:
  28. Hand handToValue;
  29. abstract value
  30.  
  31. class Bust : Rule
  32. class DefaultHand : Rule
  33. class Blackjack : Rule
  34.  
  35. class Game
  36. // Maybe other stuff... Current statitics for each player?
  37. Round currentRound;
  38. }
  39.  
  40. class Application
  41. List<Blackjack::User> users;
  42. Blackjack::Game game;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement