アットウィキロゴ

きほkk

import sho
import numpy as np
 
def paint():
 
    a=[]
    for i in range(10):
        a.append("〇")
 
    for i in range(6):
        p1=pos[i]
        a[p1]=koma[i]
 
    print(mode)
    print(a[7]+a[8]+a[9])
    print(a[4]+a[5]+a[6])
    print(a[1]+a[2]+a[3])
    print("*****")
 
koma=["王","金","銀","王","金","銀"]
ban=[]
ban.append([0,0])
for y1 in [1,2,3]:
    for x1 in [1,2,3]:
        ban.append([x1,y1])
pos=[2,1,3,8,7,9] 
hand=["先手","先手","先手","後手","後手","後手"]
mode="先手"
 
tr=0
 
paint()
 
while tr<51:
 
    tr=tr+1
 
    sub=sho.sho()
    sub.pos=pos
    sub.hand=hand
    sub.mode=mode
    sub.ban=ban
    sub.koma=koma
    sub.makedata()
    mode=sub.mode
    pos=sub.pos
    hand=sub.hand
 
    paint()
 
    if mode=="先手勝利":
       tr=100
    if mode=="後手勝利":
       tr=100
 
最終更新:2018年01月21日 23:31