Fuego学习笔记---协议(3)

3.协议具体内容

   3.1句法内容

     分两种,一种是简单数据(Simple Entities)

      int
           无符号整形0<x<2^31-1
      float
           A float is a floating point number representable by a 32 bit IEEE 754 float.
     string
           A string is a sequence of printable, non-whitespace characters. Strings  are case sensitive.
     vertex
           A vertex is a board coordinate consisting of one letter and one number,      as de ned in section 2.11, or the string pass". Vertices are not case  sensitive. Examples: B13", j11".
      color
           A color is one of the strings “white" or ”w" to denote white, or “black" or  ”b" to denote black. Colors are not case sensitive.
      move
           A move is the combination of one color and one vertex, separated by space. Moves are not case sensitive. Examples:  ”white h10",  “B F5", “w pass".
      boolean
           A boolean is one of the strings /false" and /true".

 

      第二种是组合型数据(Compound Entities)

      Collection

      格式为{x y} 表示x 后面跟着 y, 用空格隔开;x,y可以为任意简单数据。

 

      List

      格式为x*, 表示x类型的一串列表。每个元素以空格隔开

 

      Alternative

      格式为x|y,表示x或y数据

 

      Multiline List

      格式为x&, 是以LF(换行符)来分割的列表,即每个元素用LF分隔

 

4.其他一些内容

  4.1让棋的摆放

    对于一个19X19的棋盘,根据让棋的个数不同,其位置如下表:

    Handicap  Vertices
           2        D4Q16
           3        D4Q16D16
           4        D4 Q16 D16 Q4
           5        D4 Q16 D16 Q4 K10
           6        D4 Q16 D16 Q4 D10 Q10
           7        D4 Q16 D16 Q4 D10 Q10 K10
           8        D4 Q16 D16 Q4 D10 Q10 K4 K16
           9        D4 Q16 D16 Q4 D10 Q10 K4 K16 K10

     上面的表是固定的让棋位置,协议还支持随意的让棋位置。

     根据棋盘的大小不用,还有不同的放置方位,这里不一一介绍。

 

    4.2 时间

    有3个时间参数,

    1)Main time m

    2)  Byo yomi time b ----即读秒时间

    3)  Byo yomi stones s----读秒内需要走多少步棋

 

 

 

   最后是一些命令的参考,这里不再详述。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值