FreeCell Game using Windows Forms


FreeCell is an implementation of the FreeCell card game using Windows Forms. The card graphics is accessed using "cards.dll" (some code from the net whose source I have lost). The objective of the game is to move all the cards in sequence to their final destination. There are four free cells. In the area where cards are dealt, cards can be placed in descending order and with alternate colors. A click on a column chooses the card and a click on another column places the card on the other column. A double click on a card moves it to a final cell if possible or to a free cell if it cannot move to any final cell.

The code is pretty self explanatory. The Board class contains most of the logic. The main components of that are the DealArea, FinalCells and FreeCells. The FreeCells are numbered 0-3, the DealArea columns are numbered 8-15 and the FinalCells are numbered 4-7.

The program allows you to save and load deals from a file.


Similar Articles