★ AMSTRAD CPC ★ GAMESLIST ★ SOLITAIRE (COMPUTER GAMER) (c) COMPUTER GAMER ★

COMPUTER GAMER
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

Solitaire is the game where you start with 31 pegs in the shape of an equal armed cross and a hole in the centre, and you aim to finish with a single peg in the middle. To do this, you jump over one peg with Another Into an empty hole, removing the one that was Jumped over – a bit like draughts – except that you Jump vertically and horizontally instead of diagonally, and you can't move except to take another peg.

This computer version gives you 3 options.

Firstly, you can play yourself. You enter the co-ordinates of a peg and the hole you're moving to. The computer checks that the move is valid All your moves are displayed on screen The computer also detects if you haven't a valid move left and tells you

The second option allows the computer to amuse itself if you're too busy doing something else: you can set the computer the task of solving the puzzle Itself. (There are some people who actually believe computers are intended for problem-solving rather than games!) I admit, the computer does not play very intellingently, but on average, it does succeed once in every 5,000,5466,2931 goes! Seriously though, the moves are recorded on screen in case it does succeed If it fails, it resets the board and tries again, so you can set it playing and leave it.

The final option demonstrates one solution to Solitaire in case you or anybody elst thinks it's impossible (or you didn't believe me about the 5,000,5466,2931st go!)

The Program

The program is fairly straightforward The pegs and holes are held as strings which include control codes to alter ink colours and overprint.

The board is simulated by the array a( ), the elements of which are 0,1 or 2.2 indicates a hole, 1 a peg, and 0 an area off the board and out of play where pegs can't jump to.

The most complicated section is that where the computer is playing by itself. The computer picks a location and direction at random and then rotates through the possibilities from this point looking for a valid move. The section had to be written as a whole before it could be tested to see if it worked

COMPUTER GAMER #14

SOLITAIRE (COMPUTER GAMER)
(c) COMPUTER GAMER

AUTHOR: DAVID MUIR

★ YEAR: 1986
★ LANGUAGE:
★ GENRE: BASIC
★ LiCENCE: LISTING

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Solitaire    (Computer  Gamer)    LISTING    ENGLISHDATE: 2016-02-10
DL: 279
TYPE: PDF
SiZE: 1107Ko
NOTE: 2 pages/PDFlib v1.6

Je participe au site:
» Pour ce titre nous ne disposons de fichier executable sur CPC (Dump, Saisie du listing) , alors si vous avez ça dans vos cartons ou vous désirez usé vos petit doigts boudinés sur votre clavier faites le nous savoir.
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop
Page créée en 135 millisecondes et consultée 1275 fois

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.