![]() Lastly, you tell it to start the game using the 'startGame' method.Then you tell it what image packs are available using the 'addImagePack' method (more details on that later).The name can be re-used on other pages to allow the preferences to be shared between pages. The name will be used for storing and retrieving preferences, and multiple games on the same page must not share the same name. Firstly, you prepare the game using the 'new solitaireGame' constructor, giving it a unique name, and telling it where to put it (by passing it a reference to the holding element).In its simplest form, creating the game consists of just three commands. The easiest way to do this is include it inside a load event listener, but you should also be able to create the game immediately after creating the holding element. This must be done after the other scripts have been included, and after the holding element has been created. You then need to tell it to create the game. Resizing effects when using the game preferences in IE, if you put it in a td). The element must beĬapable of holding div elements, so a div or td element should be fine (note that you may get odd You will then need to create an element for the script to put the game inside. To use this, take a copy of the CardGameCore script and the solitaire script, then insert the following into the head of your document: This script also requires my CardGameCore script, which must be included before the solitaire script. NetFront 3.4 cannot use the solitaire options, and cannot automatically resize the cards when the window size changes.Īnd some DOM browsers may fail completely because their DOM support is not good enough:. ![]() ICEbrowser may fail to display the cards properly because of a bug in its graphics handling.iCab 3 cannot automatically resize the cards when the window size changes.Internet Explorer 5 on Mac cannot use the solitaire options, cannot automatically resize the cards when the window size changes, and cannot use drag-drop (it can only use click-to-move, and double click).Mozilla 1.0/Netscape 6-7 cannot double click cards to move them to the foundation stacks.Opera 7.x (fixed in Opera 8+) cannot use the solitaire options.Some browsers may have some little problems: Konqueror 3+/Safari/Chrome/OmniWeb 4.5+. ![]()
0 Comments
Leave a Reply. |