@@ -0,0 +1,1915 @@
+package Engine;%0A%0A/**%0A * User: AnubhawArya%0A * Date: 9/13/13%0A * Time: 3:00 PM%0A */%0Apublic class Hand %7B%0A    private ArrayList%3CCard%3E cards = new ArrayList%3CCard%3E();%0A%0A    // Constructur%0A    public Hand(ArrayList%3CCard%3E cards) %7B%0A        this.cards = cards;%0A    %7D%0A%0A    // Called when player wants to hit%0A    public void addCard(Card card) %7B%0A        cards.add(card);%0A    %7D%0A%0A    // Returns an array of length 1 or 2 containing possible values of the hand%0A    public array getValues() %7B%0A        int val0 = 0;%0A        int val1 = 0;%0A        boolean hasAce = false;%0A%0A        for(int i=0; i%3Ccards.length; i++) %7B%0A            cardValue = cards%5Bi%5D.getValues();%0A%0A            // If Ace%0A            if(cardValue.length == 2) %7B%0A                // If Ace already exists in hand, just add 1%0A                if(hasAce) %7B%0A                    val0 += cardValue%5B0%5D; // 1%0A                    val1 += cardValue%5B0%5D; // 1%0A                %7D%0A                else %7B%0A                    val0 += cardValue%5B0%5D; // 1%0A                    val2 += cardValue%5B1%5D; // 11%0A                    hasAce = true;%0A                %7D%0A            %7D%0A%0A            // Otherwise single-value cards (2-10, J, Q, K)%0A            else %7B%0A                val0 += cardValue%5B0%5D;%0A                val1 += cardValue%5B0%5D;%0A            %7D%0A        %7D%0A%0A        if(val0 == val1) %7B%0A            return %5Bval0%5D%0A        %7D%0A        else %7B%0A            return %5Bval0, val1%5D%0A        %7D%0A    %7D%0A%0A    public String toString() %7B%0A        switch (value) %7B%0A            case 1:%0A                return %22Ace%22;%0A            case 2:%0A            case 3:%0A            case 4:%0A            case 5:%0A            case 6:%0A            case 7:%0A            case 8:%0A            case 9:%0A            case 10:%0A                return value + %22%22;%0A            case 11:%0A                return %22Jack%22;%0A            case 12:%0A                return %22Queen%22;%0A            case 13:%0A                return %22King%22;%0A        %7D%0A        return %22%22;%0A    %7D%0A%7D%0A

Create hand class