This .zip contains a graphical z-code version of Scopa, a popular italian trick card game, by Aldo Cumani. This game can be played on any z-code interpreter supporting the version 6 z-machine and (optionally) Blorb graphics. The .zip should contain: README this file scopa.z6 game z-code scopa.blb card graphics COPYING Gnu General Public License fdl.txt Gnu Free Documentation License source/ scopa.inf game source milcards.h source of hardwired card graphics THE GAME Scopa is an ancient popular card game in Italy. It's played with a deck of 40 cards, with values from one (ace) to seven and three figures for each suit. In the traditional Neapolitan-style cards the figures are: Fante (Knave), with face value 8, Cavallo (Knight), value 9, and Re (King), value 10, and the suits are: Coppe (cups), Denari (coins), Spade (swords) and Bastoni (clubs). The game can also be played with French-style cards, with the suit equivalence Coppe=Hearts, Denari=Diamonds, Spade=Spades, Bastoni=Clubs. In this case the figures are Fante (Jack), Donna (Dame/Queen) and Re (King), with the same face values of 8, 9 and 10. The game consists of one or (typically) more rounds. In each round, the dealer starts putting four cards face up on the table and giving three cards to both players. Each player then plays in turn one of his/her cards, until all six cards have been played; six cards are then dealt again and so on until there are no more cards to be played. Each player, when it's his/her turn, must play one of the cards in hand. S/he has, in general, two options: - place on the table a card whose face value doesn't match any single card on the table, nor the sum of the face values of any combination of cards on the table; - play a card that does match either a single card or a combination of two or more cards. In this latter case, the matching card(s) are captured and placed, together with the capturing card, in the player's pile (on the left of the screen), and remain out of play until the end of the round. Note that in the case of multiple different combinations of table cards matching the same played card, the player may choose which ones to take. However, if there is on the table a single card matching the played card, that one must be taken even if there are alternative matching combinations of two or more cards. Capturing is only compulsory if you decide to play a card that captures; you may decide to play another card, if you have that possibility. In the case that all the cards on the table are captured, the player scores a scopa point in his/her favor, and this is indicated by placing the capturing card face up under the player's pile, as a reminder. If any cards remain on the table after the last card of the round has been played, they are assigned to the player that did the last capture. Note that the last card of the round never scores a scopa, even if it would by the previous rule. At the end of each round, the score of each player is computed. There are four so-called punti di mazzo (points of deck), namely: - carte (cards): one point to the player having most cards in his/her pile. In case of parity (20-20) the point is not assigned. - denari (coins): one point to the player with most cards of the coins suit. Again, in case of parity (5-5) the point is not assigned. - primiera (prime): one point to the player totalling the highest primiera score (see below). In case of parity of scores, the point is not assigned. - settebello (handsome seven): one point to the player who took the seven of coins. This is the only point that is always assigned. As concerns the primiera, the score of each player is computed by summing up the highest primiera values in each suit, where the primiera values of each card are: seven=21, six=18, ace=16, two to five=face value+10 (i.e. 12 to 15), figures=10. Hence, the highest primiera score that can be attained is 84 (four sevens). Note that if a player has no cards of a given suit, his/her primiera score is zero, irrespective of what cards s/he may have in the other suits. To the above points, each player adds one point for each scopa. The round scores are then added to the previous total, and the player that first reaches a total of at least 11 points wins the game. In case of parity (11-11, 12-12 etc.) the game continues until at the end of a round the scores are different. HOW TO PLAY Gameplay is pretty straightforward and (almost) completely mouse-driven. The starting screen displays three clickable buttons, namely a "Help" button that leads you to the text you are reading now, a "Credits" button that displays a screenful of credits text, and a "Quit" button that does what you probably have already guessed. To actually start playing, you must click on one of the cards displayed at the bottom of the screen. If you have the Blorb file, and your interpreter understands it, you should be able to choose among three different card styles: Milanese (with French suits), Neapolitan and Sicilian (with Italian suits.) If you don't have the Blorb, or your interpreter does not understand it (as e.g. xfrotz), then your choice is restricted to the Milanese deck, whose graphics are hardwired into the z-code. The table cards are displayed at the center of the screen, while your hand is at the bottom center, and the computer's one (face down) at the top center. The game starts with the computer dealing, so you have the first move; in the next round you are the dealer, and the computer has the first move, and so on alternating. The deck of cards still to be dealt are displayed next to the dealer's hand on the right, while the two piles of taken cards are on the far left. When it's your turn, you select the card you wish to play by clicking on it. The selected card will be highlighted by a red frame, as well as any table cards it captures. Note that if different combinations of table cards may be captured by the selected one, you may cycle through all possibilities by repeatedly clicking on the same card; if you have more than one card in hand, you may as well change your selection by clicking another card. When you are satisfied with your choice, click on the "OK" button to confirm it. The computer will then show its choice by turning its selection face up. Your only option now is to click the "OK" button to accept it. At the end of the round, the screen summarizes the scores of the two players. In the upper part of the screen, each player's score is broken down in terms of scope, carte, denari, primiera and settebello. The central part of the screen shows in more detail the status of the denari and primiera points. The lower part of the screen summarizes the current total scores. You must then click again on "OK" to continue. Now, if neither player has yet reached a winning score, the game goes on with another round. Otherwise, a message of the kind "I win!!" or "You win!!" is displayed, and clicking again "OK" returns you to the starting screen for another game, if you wish. Note that while you are playing, if for any reason you want to abort the current game, pressing the ESCape key twice in succession will return you to the starting screen. The same can be obtained by clicking the red "abort" button in the upper right corner. The game has been tested and works with sfrotz (Linux), xfrotz (Linux) (albeit with only the hardwired graphics) and WindowsFrotz (Linux with WINE). With the latter, the display is strangely slow, but I don't know wether it's a fault of the interpreter or of the WINE Windows emulator. The game should be played on an interpreter with a screen resolution of 640x480 pixels or larger. DISCLAIMER As usual, this code is released "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, etc. (see the file COPYING for more details.) CREDITS and LICENSE This game was designed and is Copyright (C) 2011 by Aldo Cumani. Its source code (in the source/ folder of the distribution) is released under the Gnu General Public License (GPL - see the file COPYING for details). The game code includes some (ugly) graphics for displaying a Milanese-style deck of cards; these drawings have been made by me on the basis of a real deck. The source encoding of these cards is covered by the GPL but, as far as I'm concerned, the graphics themselves are public domain. The accompanying Blorb file contains pictures of two other decks: - a Neapolitan-style deck (Blorb Pict's 100 to 140), adapted from a photo by user Florixc on Wikipedia (http://it.wikipedia.org/wiki/File:Carte_napoletane_al_completo.jpg), where it's declared to be public domain; - a Sicilian-style deck (Blorb Pict's 300 to 340), adapted from 4 photos by user Matsoftware on Wikipedia: http://it.wikipedia.org/wiki/File:Carte_da_gioco_siciliane_-_bastoni.jpg http://it.wikipedia.org/wiki/File:Carte_da_gioco_siciliane_-_coppe.jpg http://it.wikipedia.org/wiki/File:Carte_da_gioco_siciliane_-_denari.jpg http://it.wikipedia.org/wiki/File:Carte_da_gioco_siciliane_-_spade.jpg where they are released under a Gnu Free Documentation License (GFDL) As far as I'm concerned, my Neapolitan cards pictures are also public domain, while the Sicilian cards are covered by the GFDL (see file fdl.txt for details.) I wish to express my gratitude to Graham Nelson for designing the Inform compiler, to Andrew Plotkin for the Blorb format, and to all authors of z-code interpreters supporting v6 and graphics. Aldo Cumani, February 2011 For any comment, complaint, praise, bug report etc. I can be reached at sfrotz at writeme dot com