🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #6158

Re: GNUCHESS

#6158
From: Brian Wong
Date: Tue, 10 Jul 1990 05:06
67 lines
2520 bytes
In article <2971@tellab5.tellabs.com>, stein@tellabs.com (Peter Stein) writes:
>
>   2. Yes, I've seen the comments regarding pawn promotion, but I can't
>      even promote to a Queen!!

    to promote to a queen use (e.g.) h7h8q
    under-promotion e.g. a7a8b (bishop)

>   3. I've tried using "edit" to handle the pawn promotions, but it seems
>      there is no way to delete individual pieces. Do I have to use "#"
>      to delete the entire board and then enter all the pieces??

    The following (slightly modified) EditBoard routine will enable you to
    delete an individual piece. e.g. use 'xa1' to delete the piece at a1.

void
EditBoard()
/*
 * Set up a board position. Pieces are entered by typing the piece followed
 * by the location. For example, Nf3 will place a knight on square f3.
 */
{
    short a, r, c, sq, i;
    char s[80];

    ClrScreen();
    UpdateDisplay(0, 0, 1, 0);
    printz(".   exit to main\n");
    printz("#   clear board\n");
    printz("c   change sides\n");
    printz("enter piece & location: \n");

    a = white;
    do {
	scanz("%s", s);
	if (s[0] == '#')
	    for (sq = 0; sq < 64; sq++) {
		board[sq] = no_piece;
		color[sq] = neutral;
	    }
	if (s[0] == 'c' || s[0] == 'C')
	    a = otherside[a];
	c = s[1] - 'a';
	r = s[2] - '1';
	if ((c >= 0) && (c < 8) && (r >= 0) && (r < 8)) {
	    sq = locn(r, c);
	    board[sq] = no_piece;
	    color[sq] = neutral;
	    for (i = no_piece; i <= king; i++)
		if ((s[0] == pxx[i]) || (s[0] == qxx[i])) {
		    board[sq] = i;
		    color[sq] = a;
		    break;
		}
	}
    } while (s[0] != '.');
    for (sq = 0; sq < 64; sq++)
	Mvboard[sq] = (board[sq] != Stboard[sq]) ? 10 : 0;
    GameCnt = 0;
    Game50 = 1;
    ZeroRPT();
    InitializeStats();
    ClrScreen();
    UpdateDisplay(0, 0, 1, 0);
} /* end of EditBoard */

Brian
Technical Details
Message-ID: <1990Jul10.050651.29562@cs.UAlberta.CA>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!van-bc!ubc-cs!alberta!wong
References: <2971@tellab5.tellabs.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,3651a38f6633773f
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1990-07-09 22:06:51 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!van-bc!ubc-cs!alberta!wong
From: wong@cs.UAlberta.CA (Brian Wong)
Newsgroups: gnu.chess
Subject: Re: GNUCHESS
Summary: better 'EditBoard'
Keywords: opening book, pawn promotion, match vs. CM 2100
Message-ID: <1990Jul10.050651.29562@cs.UAlberta.CA>
Date: 10 Jul 90 05:06:51 GMT
References: <2971@tellab5.tellabs.com>
Organization: University of Alberta, Edmonton, Alberta, Canada
Lines: 67
Posted: Tue Jul 10 06:06:51 1990