XMLGameEngine is a VGDL (video game description language) and an engine for running games completely contained within an XML file.
Status: Built: deck, piles and a hand (Klondike); players’ cards, wild cards and a card-playing computer (Crazy Eights); points, a dealer and bets (Blackjack); patterns and odds (Texas Hold’em); tricks (Hearts), trumps and bids (Spades); melds (Gin Rummy); covering and pairs (Pyramid). Open: decks of single cards. Reference: cards.
<poker>.<deck> makes the cards; a <pile> on an object holds cards, with its rules; a <hand /> object is the player’s cursor that carries cards between piles. Piles and hands know nothing of suits, so a deck of single cards can come later.cards.1 to cards.52) with suit and rank and looks face and back, so conditions, sounds and looks work on cards.<picture> drawn as its top half. 52 faces come from 4 suits and 13 ranks. Drawing 52 faces by hand was the alternative. A card is 96 by 140 at scale 1.<moves>: what it <takes> (<samesuit />, <othercolor />, <up />, <down />, <empty>), whether a <run /> may be taken, <showtop />, faces=. The stock is <deals into> and <refill from>.<dealt>N</dealt> takes from the deck in rounds; <more>1</more> makes Klondike’s staircase over a group.<take />, <lay /> (refused when the pile does not take the cards), <drop />, <deal />. Laying back where cards came from is always allowed.<hop> goes to the next pile or card; <track /> points under the mouse, so press-drag-release and Space twice are both a move. A click on the bare table does nothing.drawOrder kept on objects.<sorted />, and a hand that owns it (<hand pile="mine" />) takes only from it and draws into it.<matches />, <wild>; a wild card makes the pile wait for a <call /> of the suit of a card the caller points at. No suit picker was needed; this is narrower than strict rules, chosen for having no extra screen.<worth> (several when it may count either); a pile’s <points><atmost>21</atmost> adds them, face-up cards only. The dealer is conditions and a timer, bets are plain variables.<patterns> set from three mechanics, <same>, <run>, <suited>, the same parts rummy and dice use. The engine finds the best and orders two by one general tie rule. A pile <score>s by a set, <with> a shared pile, the <best> so many.<score><melds />): the engine splits the cards for the least deadwood and lays the pile out that way. <each> names exceptions to worth.<trick> (follow suit), <breaks>, <trumps>; the pile knows who laid each card by <seat> and gives lead and winner. These moved out of <takes> so <takes> keeps one meaning.<collect>; a new hand is <redeal />, the same deal a new game makes.<holds>2</holds> and <takes><sum>13</sum></takes>.<avoid /> ducks with the highest losing card. Bids count tricks by the book’s rule of thumb. <team> lets a partner’s winner stand.