Thieves: Card game with SCORELIST !!!

Go to Applet now!!, Download complete sourceBack to my homepage

The game

Thieves is an easy to play card game. In the normal configuration, you get 7 source decks, one auxiliary deck and a target deck. Initially the source decks have 5 cards, the auxiliary 10 and the target 1 card. So we have 7*5+10+1 = 46 cards. These 46 cards are 11 cards from each color (1-10 and J), and two wildcards.
The object of the game is to move all source cards to the target deck using some rules.

To move a card from source to target:

To move a card from auxiliary to target:

Take a look at the applet. All clouds will be gone.

How to play

Human play

Computer play

HINT PLAY HINT DEMO

BACKTRACKING DEMO - 1

BACKTRACKING DEMO - 2

The Levels

You can play this game at different levels. Just pick one from the lower right selection box. The available levels are: BABY/ALCOHOLIC/EASY/CASUAL/NORMAL/ROCKY/WICKET. For each level I've made some statistics using the HINT-DEMO mode. Here is the summary !
 
LEVEL
Cards
Decks
%Winning
n=1000, d = 1
%Winning
n=100, d = 5
Baby
5
3
85%
92%
Alcoholic
8
4
44%
61%
Easy
9
5
23%
40%
Wicket
11
6
16%
23%
Casual
10
6
9%
20%
Rocky
11
5
8%
17%
Normal
11
7
2%
4%
By the way: 'n' is the number of games  played and 'd' is the 'Hint' search depth.

High Score List

There is a high-score list for two different levels.

The Applet; HighScore List: Easy, Normal


 

Backtracking (Download complete source)

Backtracking is a usual. Do a move at a given depth. Call recursive procedure to do next moves at higher depths. After procedure returns undo move at this depth an try another if still possible moves left over at this depth.

public void playGame() {
    if (isDone()) {
        ...
    } else {
        //Try source decks
        for (int i = 0; i < num_deck; i++) {
            if (getSource(i).isAllowedTo(getTarget())) {
                moveFromSource(i);
                playGame();
                moveToSource(i);
            }
        }
        //Try auxiliary deck
        if (!getAuxiliary().isEmpty()) {
            moveFromAuxiliary();
            playGame();
            moveToAuxiliary();
        }
    }
}

 Index Page