Forty Thieves

Forty Thieves is a variation of the classic solitaire with slight modifications to the original rules. This game is played with two decks of cards and all jokers removed. At the beginning, 40 cards are dealt face-up in 10 columns (tableaus). You are only able to move cards one by one, and when a tableau is empty, you can place any card there. There is also a waste pile (you can only filter through this pile once), and eight foundations.

The goal of the game is to move all decks from the tableau to the foundation (starting from ace, all the way to king of the same suit).

This program is the backend code for this game, determining important information regarding a current game's state. I created this program using C++ for a Software Design course.

The program determines things like any possible moves from tableau to tableau, tableau to foundation, waste to tableau, current game state, whether the game is impossible to win, and whether the game has been won.

When testing, vectors, which held the decks, were filled witha ll the cards in a deck twice. After the two decks were created, the game was dealt randomly and a few moves were done. This was done in order to test out whether the program would actually determine the correct information about the current game state.

This project was very informative. It provided a better understanding of how makefiles could be efficient and effective when creating a program with a large amount of files.

All source code is available upon request.

Contact Me

If you have any questions or inquiries feel free to contact me at: