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 c

⟦0068b92ac⟧ TextFile

    Length: 1841 (0x731)
    Types: TextFile
    Names: »curse.c«

Derivation

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

TextFile

/*
 * $Header: curse.c,v 1.3 88/02/19 13:46:58 hale Exp $
 */

/*

        Copyright 1987      Greg Hale

Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
documentation.  No representations are made about the
suitability of this software for any purpose.  It is
provided "as is" without express or implied warranty.

*/


#include "go.h"


curpos = 0;
#define OFFX (2*MAXX+2)
#define MAXL 23

connectmes()
{
	extern char *myname, myhostname[];
	mvaddstr (0,1,"Waiting for other player to start his process.");
	mvaddstr (1,1,sprintf(buf,"Have him type \"go/xgo %s[@%s]\"",
		myname,&myhostname[0]));
	refresh ();
}

doneconnectmes()
{
	clear();
	refresh();
}

CLEAR()
{
	clear();
	refresh();
}

DoQuit()
{
	char c;
	addmes("- Opponent wishes to quit.  Do you accept? (y/n)");
	do c = GetAKey0();
	while (c!='y' && c!='n');
	if (c=='y') {
		SEND(MACCEPT);
		Score();
	} else {
		dodecline();
		SEND(MDECLINE);
	}
	move(0,0);
	clrtoeol();
	refresh();
}


#define mesgy 1
#define mesgy2 5
#define mesgx 42


addmes(mes)
char *mes;
{
	do {
	    move(curpos+mesgy,mesgx);
	    printw("%.35s",mes);
	    curpos = (curpos + 1) % (mesgy2-mesgy+1);
	    move(curpos+mesgy,mesgx);
	    clrtoeol();
	    if (strlen(mes)<=35) break;
	    else mes+=35;
	} while(1);
	refresh();
}

beginline()
{
	move(curpos+mesgy,OFFX);
}

/*
 * $Log:	curse.c,v $
 * Revision 1.3  88/02/19  13:46:58  hale
 * Added io changes for loading games.
 * Load game is cleaned up.  Variable board
 * sizes and formats available in save game
 * as well as printed comments.
 * 
 * Revision 1.2  88/02/13  12:44:18  hale
 * added logging.
 * 
 */