hahei09 发表于 2020-6-6 22:41

淑贞妹妹,买个趁手的老花镜或放大镜不是更好吗?:lol

欧拉 发表于 2020-6-6 22:49

主要是心理上觉得看小字不爽,放大镜和老花镜都还不需要:lol

鲸头散_dQFJj 发表于 2020-6-6 23:19

程晓流精装版不错:lol

chenggs2008 发表于 2020-6-7 16:56

还是知难而退,保全名声吧

逢芳必点 发表于 2020-6-7 19:08

欧拉好名字

十月雨丝 发表于 2020-6-8 13:37

逢芳必点 发表于 2020-6-7 19:08
欧拉好名字

但还是不如“淑贞”好:lol

榉木 发表于 2020-6-8 15:05

淑贞,注意保护视力,劳逸结合:lol

榉木 发表于 2020-6-8 15:06

choufengzi 发表于 2020-6-6 17:29
欧拉

欧拉不是电动汽车吗:lol

leexch 发表于 2020-6-8 15:30

现在不管谁出发阳论,一定会发现还有BUG

傻瓜 发表于 2020-6-8 15:35

本帖最后由 傻瓜 于 2020-6-8 15:36 编辑

淑贞新人帖一出,我等油腻老男人兴奋得胡言乱语:lol

欧拉 发表于 2020-6-8 16:55

本帖最后由 欧拉 于 2020-6-8 17:32 编辑

请各位大哥多提携 :$

傻瓜 发表于 2020-6-8 17:26

淑贞无情,这个寡淡的季节,让肥皂泡多飞一会儿多好

欧拉 发表于 2020-6-8 17:31

傻瓜 发表于 2020-6-8 17:26
淑贞无情,这个寡淡的季节,让肥皂泡多飞一会儿多好

好,那我改一下,再装一会儿;P

SOARDLIANG 发表于 2021-10-2 09:26

肥虎说的对啊
从来就没有什么救世主,一切只能自己靠自己。

朱涵清 发表于 2022-1-5 16:17

15年前倒是自己用 python 2.写过一个程序,能把 sgf 文件的问题图 转换成 txt 文本,源代码分享给大家,
现在 用 python 3. 了,有些地方要改一下才能运行了。

import dircache
from os import *

m = map(None, 'abcdefghijklmnopqrs', range(1,20))
m2 = map(None, 'srqponmlkjihgfedcba', range(1,20))

EMPTY_ROW=2
EMPTY_COL=3

def convert(sgfGame,txtGame,prb):
      # x="ab" pos0=1,pos1=2
      moveList=[]
      # black or white stone list
      i=0
      whoMove='B'
      while (i<len(sgfGame)):
                while not (sgfGame=='A' and ( sgfGame=='B' or sgfGame=='W') ):
                        i=i+1
                        if i >len(sgfGame)-2:
                              break
                if i >= len(sgfGame)-2:
                        break
                color=sgfGame      
                i=i+2
                while(i<len(sgfGame)-3 and sgfGame=='[' and sgfGame==']' ):
                        moveList.append(sgfGame+color)
                        i=i+4
                        if sgfGame=='\x0d':
                              i=i+2
                if i >= len(sgfGame)-3:
                        break            
      i=0
      while (i<len(sgfGame)-3 and sgfGame<>';B' and sgfGame<>';W' ):
                i=i+1
      if sgfGame=='B':
                whoMove='B'
      elif sgfGame=='W':
                whoMove='W'
      else:
                print('error'+sgfGame+':'+prb)
      i=0
      while (i<len(sgfGame)-3 and sgfGame<>'AE' ):
                i=i+1
      if sgfGame=='AE':
                print ('errorAE AE AE _______:'+prb)
      emptyRow=1
      emptyCol=1
      mset='none'
      pos0_sum=0
      pos1_sum=0
      pos_count=0
      for x in moveList:               
                pos0 = filter(lambda z, x=x: z==x, m)
                pos1 = filter(lambda z, x=x: z==x, m)
                pos0_sum=pos0_sum+pos0
                pos1_sum=pos1_sum+pos1
                pos_count=pos_count+1
      pos0_avg=pos0_sum/pos_count
      pos1_avg=pos1_sum/pos_count
      if pos1_avg<10:
                if pos0_avg<10:
                        mset='tl'
                else:
                        mset='tr'      
      else:
                if pos0_avg<10:
                        mset='dl'
                else:
                        mset='dr'      
               if mset=='dr':
                pos1_avg=20-pos1_avg
                     pos0_avg=20-pos0_avg
      if mset=='dl':
                     pos1_avg=20-pos1_avg
      if mset=='tr':
                     pos0_avg=20-pos0_avg
      for x in moveList:               
                pos0 = filter(lambda z, x=x: z==x, m)
                pos1 = filter(lambda z, x=x: z==x, m)
                if mset=='dr':
                        pos1=20-pos1
                        pos0=20-pos0
                if mset=='dl':
                        pos1=20-pos1
                if mset=='tr':
                        pos0=20-pos0
                if pos0_avg<pos1_avg:
                        posp=pos0
                        pos0=pos1
                        pos1=posp
                if pos1>emptyRow:
                        emptyRow=pos1
                if pos0>emptyCol:
                        emptyCol=pos0
                pos=((pos1-1)*20+pos0-1)*2
                if (x == 'B' and whoMove =='B') or (x == 'W' and whoMove =='W'):
                        stone='\xa1\xf1'
                elif (x == 'B' and whoMove =='W') or (x == 'W' and whoMove =='B'):
                        stone='\xa1\xf0'
                else:
                        print 'error!!!!!'                              
                t=txtGame+stone+txtGame
                txtGame=t
      return (txtGame,emptyRow,emptyCol)
      
dir=dircache.listdir('tlt/')
emptyGame=file("board.txt","rb")
emptyBoard=emptyGame.read()
txtFile=file("tlt.txt","w+b")
for x in dir:
      txtGame=emptyBoard
      string_x=str(x)      
      sgfFile=file("tlt/"+str(x),"rb")
      sgfGame=sgfFile.read()
      #txtGame=convert(sgfGame,txtGame)      
      (txtGame,emptyRow,emptyCol)=convert(sgfGame,txtGame,x)      
      endRow=9
      emptyCol=14      
      for i_row in range(0,endRow):
                end=emptyCol*2               
                # txtFile.write(txtGame)
                if i_row==endRow-1:
                        txtFile.write(txtGame+string_x)
                else:
                        txtFile.write(txtGame)                     
                txtFile.write('\x20\x0d\x0a')
      txtFile.write('\x0d\x0a')
               
      sgfFile.close()

txtFile.close()
哈哈
页: 1 [2] 3
查看完整版本: 有大佬搞一个飞扬版发阳论吗?