Deal cards for FreeCell: Difference between revisions

Line 1,558:
 
{{FormulaeEntry|page=https://formulae.org/?script=examples/Deal_cards_for_FreeCell}}
 
'''Solution'''
 
There is no need to remove from a deal to be added to another one, it can be performed on a single array. It is and iteration from 52 to 1 indicating the end of the first array, and therefore the start of a second one after each swap. The only inconvenience is that second array contains the information in reversed order, but when it is shown it is also read in reversed order.
 
The number 127,185 is the decimal number of the 🃑 Unicode character.
 
In the Unicode playing cards characters, there is the Knight, between the Jack and Queen suits, which is not used, so it is skipped in the order.
 
[[File:Fōrmulæ - Deal cards for FreeCell 01.png]]
 
'''Test case.''' The —only— impossible deal #11982 in the original version of FreeCell for windows:
 
[[File:Fōrmulæ - Deal cards for FreeCell 02.png]]
 
[[File:Fōrmulæ - Deal cards for FreeCell 03.png]]
 
=={{header|Go}}==
2,120

edits