Table of Contents

Freecell Wiki Page

Team: Lin Xi
FreeCell is a solitaire-based card game played with a 52-card standard deck.

Object

To move all the cards to the foundations.

Layout

4 foundation piles or home cells (top right) - build up in suit from Ace to King.

4 cells (top left) - storage locations for cards. Only 1 card allowed in each cell.

8 piles (below foundations and cells) - build down by alternate color. Move groups of cards if they are in sequence down by alternate color and if there are enough free cells that the cards could be moved individually. Spaces can be filled by any card or legal group of cards. At the start of the game 7 cards are dealt face up to the leftmost 4 piles, 6 cards are dealt face up to the remaining piles.

Notes

Groups of cards in the tableau can only be moved as a group if there are a sufficient number of empty cells available to store the cards individually. The ability to move cards as a group is only a shortcut to moving the group one card at a time.

Tips

Try to keep as many cells empty as possible.

Challenges/Insights

Team Lin Xi suffered from two critical challenges during this project. The first main obstacle and more than likely our “Achilles Tendon” throughout this project was time. To clarify, I don't mean that there wasn't enough time assigned to complete the project there was more than a sufficient amount given, however a subtle mixture of procrastination and the unexpected occurrences of life tend to make things interesting to say the least. Once the issues were resolved we were left with a minimal amount of time to complete our task. However team Lin Xi recovered in time and were able to accomplish their set goals.

The next and quite significant challenge we encountered was Windows/UNIX compatibility. Team Lin Xi's FreeCell program was written in visual studio which runs under windows. Although both VS and VI both support the C/C++ languages they use separate libraries therefore making certain commands that are compatible in Windows simply non-existent within the realm of UNIX. So initially that created an obstacle. Once that issue was resolved we found that simply transporting the code from VS to VI takes the liberty of adding some of its own characters to the code. About 40000 characters… Yet another obstacle defeated by Team Lin Xi's mighty prowess. So after the library issues, and the character issues. The code finally compiles correctly as it did in VS. Anticipating that Lin Xi would soon be embarking upon an enjoyable little game of FreeCell. However come to our surprise (Sarcasm)… The game wasn't functioning correctly, even though in VS it was working flawlessly. The game would load, correctly display the cells, and prompt the user for column selection. Then things began to slowly go down hill. First, after the prompt was displayed, about two dozen “PuTTY” messages were outputted. Trying to ignore that for the moment and move on, the column selection was inputted and then what happened was most unappreciated. The program dived into an infinite loop from which it would never recover. The next prompt displayed and would continue to display until the program was finally exited manually. To fix this we had to destroy the idiot proof logic. By removing the two while loops that kept the cells the player can choose within bounds.