Package
cardTypes
Class MacaoPage
Methods
The class MacaoPage is not a class itself, but it is used to document the global properties and methods of the package optional/cards/cardTypes.js.
Method Summary |
Array |
createRummyCards(optional boolean noToolTip, optional String rearImageUrl, optional String rearImagePack2Url, optional boolean tileRearImage)
Call this method to create a set of 108 Rummy cards.
|
Array |
createStandardCards(optional boolean twoPacks, optional boolean jokers, optional boolean noToolTip, optional Array values, optional String rearImageUrl, optional String rearImagePack2Url, optional boolean tileRearImage)
Call this method to create a standard set of cards.
|
Array createRummyCards(optional boolean noToolTip, optional String rearImageUrl, optional String rearImagePack2Url, optional boolean tileRearImage)
Call this method to create a set of 108 Rummy cards.
The cards have the following card values:
Ace = 11
2 = 2
...
9 = 9
10 = 10
Jack = 10
Queen = 10
King = 10
Joker = 20
Parameters
noToolTip: Provide true to get cards without tooltips. Provide false to show the card title as tooltip.
rearImageUrl: Provide the URL of the rear image for pack 1 relative to the base path. Provide null to use the standard rear image.
rearImagePack2Url: Provide the URL of the rear image for pack 2 relative to the base path. Provide null to use the standard rear image.
tileRearImage: Provide true to tile the provided rear images. Provide false if you didn't specify any image or if the images are not to be
tiled.
Returns
The method returns an array of 108 MacaoCard objects containing the produced cards.
Array createStandardCards(optional boolean twoPacks, optional boolean jokers, optional boolean noToolTip, optional Array values, optional String rearImageUrl, optional String rearImagePack2Url, optional boolean tileRearImage)
Call this method to create a standard set of cards.
A standard set consists of the cards Ace, 2, ..., 10, Jack, Queen, King for the suits Clubs, Spades, Hearts and Diamonds.
Optionally you can have two packs and two jokers for each pack. So with one call you can create up to 108 cards.
Parameters
twoPacks: Provide true to create two packs. Provide false to create only one pack.
jokers: Provide true to add two jokers to each pack. Provide false to get no jokers.
noToolTip: Provide true to get cards without tooltips. Provide false to show the card title as tooltip.
values: Provide an array of 14 integer values for the cards. The value with the index 0 is used for the Ace. 1 is used for the 2 and
so on. The value with the index 12 is used for the King. 13 is used for the jokers. Provide null to get the following standard
values:
Ace = 1
2 = 2
...
10 = 10
Jack = 11
Queen = 12
King = 13
Joker = 20
rearImageUrl: Provide the URL of the rear image for pack 1 relative to the base path. Provide null to use the standard rear image.
rearImagePack2Url: Provide the URL of the rear image for pack 2 relative to the base path. Provide null, if you have only one pack or if you
want to use the standard rear image.
tileRearImage: Provide true to tile the provided rear images. Provide false if you didn't specify any image or if the images are not to be
tiled.
Returns
The method returns an array of MacaoCard objects containing the produced cards.