|★ AMSTRAD CPC ★ GAMESLIST ★ PONTOON (COMPUTER GAMER) (c) COMPUTER GAMER ★|
Welcome to Arnold's gambling saloon and a friendly game of Pontoon. The computer is the dealer and banker. You have 100 pounds to gamble. Arnold is not very rich so you only have to increase this to 500 pounds to break the bank. But it will not be easy because Arnold plays a cunning game of Pontoon.
The game is menu driven. First the cards are shuffled and they are only shuffled again if somebody gets a pontoon. Used cards are placed back under the pack. This allows good pontoon players to remember what cards are likely to turn up next.
Each round, you are dealt a card and you bet on it. Then you can stick, twist or buy. You cannot stick on less than 16. Aces can be called 11 or 1. If you go over 21, you bust and the banker wins. You cannot buy a card for more than your initial stake or minimum subsequent bet. If you twist, you don't pay but you cannot buy subsequent cards.
The program is written as a number of short distinct routines headed by REMarks to make it easier to follow. Important variable names are chosen
Memory locations 40000 to 40051 are used to store the pack in the form of numbers 1 to 52. Each time a card is drawn from location 40000, the rest of the numbers are all moved up one location. At the end of a round, for the number of cards used, the numbers are POKEd to the bottom, starting at 40051 and working backwards.
The shuffling routine generates 52 numbers at random, none of them equal, in a short time. It will work for any number and could be useful in other programs – eg filling out a football coupons.
The program is made by comprehensive error-trapping and the need to check for illegal bets and moves by the player. Flags are set and reset to check for such things as: Is it a pontoon? Has the player twisted? Is there a ten in his/her hand? (if there is its not a pontoon). Can the player or computer stick? should the aces be called 11 or 1? Has the player or the computer bust?
If readers enjoy the program and are competent programmers, they might like to add subroutines to improve the graphics on the cards which have been kept simple to save too much typing in.
COMPUTER GAMER #6
CPCrulez[Content Management System] v8.7-desktop/cache
L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.