示例#1
0
文件: qgtp.cpp 项目: EPeillard/qgo
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();
}
示例#2
0
文件: qgtp.cpp 项目: 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();
}
示例#3
0
文件: qgtp.cpp 项目: 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();
}