wxWidgets/demos/forty
Vadim Zeitlin 49a63afbad Avoid CRT deprecation warnings for MSVC build using makefiles too.
Define _CRT_SECURE_NO_DEPRECATE, _CRT_NON_CONFORMING_SWPRINTFS and
_SCL_SECURE_NO_WARNINGS when using makefiles to build the library too for
consistency with the project files.

These defines are only needed for VC8 and later but should do no harm for the
previous versions.

See #11009.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-07 21:38:31 +00:00
..
about.htm Added HTML About box and changed player dialog label 2002-06-12 13:19:08 +00:00
canvas.cpp Use wxString's empty() when checking if the string is (non-)empty throughout wx. 2011-01-22 14:38:36 +00:00
canvas.h Removed tabs. 2004-06-02 09:14:59 +00:00
card.cpp Replaced Ok() occurrences with IsOk() throughout trunk. 2011-05-03 16:29:04 +00:00
card.h Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC. 2004-10-05 15:38:40 +00:00
cards.ico renaming and moving samples around 2000-01-08 15:28:31 +00:00
descrip.mms set up for OpenVMS richtext & regex and add more samples in compile cascade 2009-10-05 09:13:42 +00:00
forty_vc7.vcproj Rebake everything using bakefile 0.2.9. 2011-02-03 15:02:45 +00:00
forty_vc8.vcproj Rebake all project files to reflect MSVC deprecation warnings defines. 2012-02-07 21:38:09 +00:00
forty_vc9.vcproj Rebake all project files to reflect MSVC deprecation warnings defines. 2012-02-07 21:38:09 +00:00
forty-icons.r Added new icons 2004-03-23 08:57:45 +00:00
forty.bkl Add libs html and xml to bakefiles of samples/contribs/demos using lib adv 2005-10-23 21:52:24 +00:00
forty.cpp Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
forty.dsp Rebake from clean wx tree. 2010-01-04 00:45:45 +00:00
forty.h mark all dtors which are virtual because base class dtor is virtual explicitly virtual themselves 2006-09-05 20:47:48 +00:00
forty.r Added new icons 2004-03-23 08:57:45 +00:00
forty.rc Use XPM for symbols and pictures on all platforms 2006-03-28 11:12:48 +00:00
forty.xpm made all XPM const to avoid warnings from mingw32 4.0 and adopt the code accordingly (patch 1872384) 2008-01-16 01:39:44 +00:00
game.cpp Globally replace _T() with wxT(). 2009-07-23 20:30:22 +00:00
game.h mark all dtors which are virtual because base class dtor is virtual explicitly virtual themselves 2006-09-05 20:47:48 +00:00
makefile.bcc Always link with expat in monolithic build. 2011-12-25 13:28:01 +00:00
makefile.gcc Always link with expat in monolithic build. 2011-12-25 13:28:01 +00:00
Makefile.in Always link with expat in monolithic build. 2011-12-25 13:28:01 +00:00
makefile.unx replaced "CC = gcc" and even stranger "CPP = gcc -g" (huh?) with 2001-11-28 18:10:15 +00:00
makefile.vc Avoid CRT deprecation warnings for MSVC build using makefiles too. 2012-02-07 21:38:31 +00:00
makefile.wat Always link with expat in monolithic build. 2011-12-25 13:28:01 +00:00
pictures.xpm made all XPM const to avoid warnings from mingw32 4.0 and adopt the code accordingly (patch 1872384) 2008-01-16 01:39:44 +00:00
pile.cpp Nuke #pragma implementation/interface's 2005-09-23 12:56:45 +00:00
pile.h Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC. 2004-10-05 15:38:40 +00:00
playerdg.cpp Use wxString's empty() when checking if the string is (non-)empty throughout wx. 2011-01-22 14:38:36 +00:00
playerdg.h Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC. 2004-10-05 15:38:40 +00:00
readme.txt renaming and moving samples around 2000-01-08 15:28:31 +00:00
scoredg.cpp don't use deprecated function 2011-12-23 17:38:30 +00:00
scoredg.h Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC. 2004-10-05 15:38:40 +00:00
scorefil.cpp Globally replace _T() with wxT(). 2009-07-23 20:30:22 +00:00
scorefil.h Removed tabs. 2004-06-02 09:14:59 +00:00
symbols.xpm made all XPM const to avoid warnings from mingw32 4.0 and adopt the code accordingly (patch 1872384) 2008-01-16 01:39:44 +00:00

Forty Thieves is a patience game played with two full packs of
cards. At the start of the game forty cards are dealt on the
eight 'bases' along the top of the window. The object of the
game is to place all the cards onto the eight 'foundations'. The
foundations are built starting with the ace and adding cards of
the same suit up to the king. Cards are dealt from the pack and
placed on the discard pile. Cards may be moved from the discard
pile or one of the bases to a base or a foundation. Only one
card can be moved at a time. Cards can only be placed on a base
if the top card of the base is of the same suit and is one
higher in pip value or the base is empty e.g. the eight of
spades can only be placed on top of the nine of spades.

When the mouse cursor is over a card which can be moved it
changes to the 'hand' cursor. The card can then be moved by
double clicking the left button.

The mouse cursor also changes to a hand when a card is dragged
by placing the cursor over the card and holding down the left
button. This feature can be enabled and disabled by selecting
the 'Helping hand' option from the Edit menu.

The 'foundations' are the eight piles of cards down the left
side of the window. When the game starts these piles are empty.
The object of the game is to place all the cards on the
foundations. An ace can be placed on any empty foundation. Other
cards can only be placed on a foundation if the top card is of
the same suit and is one lower in pip value e.g. the three of
clubs can be placed on the four of clubs.

The 'bases' are the ten piles of cards along the top of the
window. At the start of the game four cards are dealt face up on
each of the bases. A card can be added to a base if the base is
empty or if the top card is of the same suit and is one higher
in pip value e.g. the queen of hearts can be placed on the king
of hearts The top card of a base can be moved onto another base
or a foundation.

Cards can be only moved one at a time. The top card of the pack
can be dealt onto discard pile by placing the mouse cursor over
the pack and pressing the left button. The number of cards
remaining is displayed to the right of the pack.

Cards can be moved from the discard pile or the bases either by
'double-clicking' or by dragging. If the left button is
double-clicked when the mouse cursor is over a card and it can
move to another pile, it will do so. This is a quick way of
moving cards when their destination is unambiguous.

A card can be dragged by placing the mouse cursor over the card
and holding down the left button. The card will follow the mouse
cursor until the left button is released. If the card is over a
pile on which it can be placed it will be added to that pile,
otherwise it will be returned to the pile from which it was
dragged.

One point is scored for every card that is placed on a
foundation. Since there are two packs of 52 cards the maximum
score is 104. A record is kept of the number of games played,
the number of games won, the current score and the average
score. This information is displayed at bottom right of the
window and is stored on disk between games. A game is deemed to
have started if the cards have been dealt and any card has been
moved. If the game is abandoned before it is finished (i.e. by
starting a new game or closing window) it counts as a lost game.
New players can be added by selecting the 'Player' option from
the Game menu. A summary of players' scores can be displayed by
selecting the 'Scores...' option from the Game menu.

All moves are recorded and can be undone. To undo a move select
the undo menu item from the Edit menu. A quicker way of undoing
is to press the right mouse button (it doesn't matter where the
mouse cursor is). Right button undo can be enabled and disabled
by selecting the 'Right button undo' option from the Edit menu.
Pressing the right mouse button with the control key pressed
re-does a previously undone move.

An empty base or two is very useful as it gives the opportunity
to unscramble other bases. Try not to build onto kings which
obscure valuable cards as it will be difficult to get to them
later. The undo facility is very useful for going back and using
'hindsight'.

Don't be put off if you can't win every game. I reckon winning 1
in 10 is pretty good (winning 1 in 3 is excellent).