DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T i

⟦f7a45241e⟧ TextFile

    Length: 1994 (0x7ca)
    Types: TextFile
    Names: »instructions.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Challenge/instructions.c« 

TextFile

#include "challenge.h"

char *instructions[] = {
"The display  shows at the top  the hand of the computer,  in the middle the\n",
"cards on the table and at the bottom your hand.  On the left of the display\n",
"of the cards on the table  the topcard is shown.   If there are no cards on\n",
"the table, it displays '---'.\n\n",
"If it is your turn to play you can choose any of the following:\n",
"1. Play a card of the same suit  as the top card on the table;  but it must\n",
"   be higher.   If there are no cards  on the table you can play  any card.\n",
"2. If the top card is not one of your trumps, you may also play a trump.\n",
"3. If there are cards on the table you may pick them up (all of them).\n",
"Your trumps are hearts; the computers trumps are spades.\n",
"At any time,  if you enter a question mark,  the program  will show you the\n",
"cards you are allowed to play.   To play a card mark suit and value.   10's\n",
"may be indicated by T or X.  Case is not important.\n\n",
"Goal of the game is to play your last card.\n\n",
0,
"The game can  be played  with different sizes  for the deck of cards.   The\n",
"default size is 8, i.e. 8 cards of eacht suit or Ace, King etc.  down to 7.\n",
"If you are a novice it is better to start with a smaller size.  Do you want\n",
"to start with size is 4 (i.e. only Aces, Kings, Queens and Jacks)? (y/n) ",
0,
"\n",
"Also  the move  search  strategy  of the computer  can be simpler  than the\n",
"default.  Do you want a very simple one? (y/n) ",
0};

put_instructions(initial)
    char initial;
{
    char **cp, c;

    clear();
    move(0, 0);
    for(cp = instructions; *cp != 0; cp++) {
    	printw(*cp);
    }
    if(!initial) {
    	refresh();
    	return;
    }
    for(cp++; *cp != 0; cp++) {
    	printw(*cp);
    }
    refresh();
    if(yesno()) {
    	size = 4;
    	size2 = 8;
    	max_card = 16;
    }
    for(cp++; *cp != 0; cp++) {
    	printw(*cp);
    }
    refresh();
    if(yesno()) {
    	depth = 0;
    }
}