Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.13 seconds.

  1. Replies
    5
    Views
    2,843

    [SOLVED] Re: BlackJack.. Random Card Assignment?

    Yikes. Let me see if I can give you a hint. Say you have a card Object:

    public class Card{

    Suit suit;
    Face value;

    public Card(Suit suit, Face value){
    this.suit = suit;
    ...
  2. Replies
    5
    Views
    2,843

    [SOLVED] Re: BlackJack.. Random Card Assignment?

    Well yeah, you'd store the Card Objects in an array or a List or something. It's at creation time that the enums come in handy- you'd just need a nested for loop instead of 52 initializations.
  3. Replies
    5
    Views
    2,843

    [SOLVED] Re: BlackJack.. Random Card Assignment?

    Instead of having 52 different enum constants, you could have two different enum types: one for suit, one for number. Then have a Card Object that contains an enum constant from each enum type.
Results 1 to 3 of 3