Esempio n. 1
0
int QGtp::set_free_handicap(QList<Point> handicap_stones)
{
    QByteArray message("set_free_handicap");
    for ( int i=0; i<handicap_stones.length(); ++i )
    {
        message.append(" ").append(encodeCoors(handicap_stones[i].x,handicap_stones[i].y));
    }

    fflush (message);
    return waitResponse();
}
Esempio n. 2
0
File: qgtp.cpp Progetto: danhfan/qgo
/* Function:  Play a white stone at the given vertex.
* Arguments: vertex
* Fails:     invalid vertex, illegal move
* Returns:   nothing
*/
int
QGtp::playwhite (int x, int y)
{
    fflush ("play white "+encodeCoors(x,y));
    return waitResponse();
}
Esempio n. 3
0
File: qgtp.cpp Progetto: danhfan/qgo
/* Function:  Play a black stone at the given vertex.
* Arguments: vertex
* Fails:     invalid vertex, illegal move
* Returns:   nothing
*/
int
QGtp::playblack (int x, int y)
{
    fflush (QByteArray("play black ")+encodeCoors(x,y));
	return waitResponse();
}