|(anonymous IP: 184.108.40.206,109)|
Total files: 1101
Full index file
Recent index file
[Show comments] [Show snapshots] [Show videos] [Show content] [Replace file]
"Spades" is a program written to play the card game Spades. It may be run from the CLI or the Workbench. The files required to play are "Spades" and "Spades.images", and both must be in the same directory. NOTE: Spades now requires AmigaDOS 2.xx to run. This is because Spades is essentially a tool for me to learn Amiga programming (I have made only $5 off of it), and I am trying out some of the 2.xx stuff as I modify it. This is a one player version of Spades -- you play one hand, and the computer plays your partner and two opponents. The program plays by the following rules adopted by my friends and I here at the University of South Florida: 1) Four players are found, divided into two partnerships of two players each. Partners sit opposite each other. 2) A dealer is randomly picked. Each player receives 13 cards from a standard 52-card deck dealt clockwise starting with the player on the dealer's left. On successive hands, the deal passes to the left. 3) Starting to the left of the dealer, each player bids the number of tricks he feels his hand can take. Bidding passes clockwise. A partnership's bid is the total of the two partners' bids. A partnership must take this total number of tricks. 4) Play starts with the player to the left of the dealer and passes clockwise. The only rule about leading is that spades may not be lead until spades have been broken (i.e., played during a hand), unless a player holds only spades. 5) Players must follow suit -- if you have a card of the suit lead, you must play it. Otherwise, any suit may be played. Play ends with the player to the right of the leader. In other words, each player plays one card. 6) Highest card of the suit lead, or highest spade if a spade has been played, wins the trick. Cards rank 2 lowest through Ace highest. The trick winner scores one trick for his partnership and then leads for the next trick. 7) After all 13 tricks in a hand have been taken, scores are totaled. If a partnership takes at least as many tricks as they bid, they get 10 points for each trick they bid and one point for each trick they took over their bid. If a partnership fails to take the number of tricks they bid, they lose 10 points for each trick they bid. If NIL bids are in effect, and a player bid zero tricks and took zero, his side scores 100 points. If a player bid zero and took at least one trick, his side loses 100 points. If Bags are in effect, and a team has accumulated 10 or more overtricks, they lose 100 points. Negative scores are possible. 8) Deal passes to the left for another hand. First team to 500, or the team with the highest score if both cross 500, wins. When the program is first started, the computer will randomly deal out cards to each player until the Ace of Spades is dealt. This player becomes the dealer. The computer will then deal the cards. You will see your hand at the bottom of the screen. Your partner sits across from you (at the top of the screen), and your opponents are to either side of you. The computer players will bid automatically. Their bids will appear as numbers in front of the positions at which they are sitting. When it is your turn to bid, a black bid box will appear in the lower right-hand corner of the screen. Use the left mouse button to select your bid. Clicking on the plus sign will raise your bid one trick. Clicking on the minus sign will lower your bid one trick. Clicking on OK will accept your bid. Selecting the Suggest option from the Game menu (or typing Right- Amiga-s on the keyboard) will cause the computer to suggest a bid for you. After all bids have been entered, the computer will pause for you to examine the bids. When you are ready to play, click the left mouse button. Cards will then be played. Cards played by a computer player will appear in the appropriate position on the screen. When it is your turn to play, the computer will prompt you. Simply point at the card you want to play and click the left mouse button. Again, selecting Suggest from the Game menu will cause the computer to suggest a card for you to play (it will mark it with an asterisk). Note that the computer will not let you play an illegal card. If nothing happens when you click, you are either trying to lead spades before they have been broken or you are not following the lead suit when you can. After all cards in the trick have been played, the computer will place an asterisk in front of the winning card and update the trick count. If this was also the last trick in the hand, it will update the scores. It will then pause for you to look at all the cards that were played. When you are ready to continue, click the left mouse button. This cycle will continue until a winner is found. The program will then display a final score screen and ask whether or not you would like to play again. Clicking YES will cause the game to start over. Clicking NO will bring you back to the environment you started the game from. Note that the game may be quit at any time by selecting Quit from the Project menu. There are now several menus with the game. Under the Project menu, there are New Game (start a new game), Save Hand (more in a minute), Print Hand (not yet implemented), About (shows some information about myself), and Quit (exit the game). Under the Game menu, there are NIL Bids (toggles the NIL rule on and off -- the rule is in effect when checked), Bags (toggles the Bags rule on and off -- the rule is in effect when checked), and Suggest (suggest a bid or play as listed above). New options may be added here later. The Save Hand menu option is a toggle. As long as it is checked, each hand will be appended to the file "Spades.save" in the current directory. This option has been added for two reasons: so you can review hands later, and so that you can send me this file with a hand you think the computer goofed up on. If you see a mistake, turn this option on, and then mail or E-Mail me a copy of that file, along with the play you feel the computer should have made and why. I will use this to help enhance the computer players. NOTE: If you leave this option on, the Spades.save file can get quite large. Remember to clean it up from time to time. Spades creates this file if it doesn't exist, so don't worry about keeping a copy around.