=2: r,c...">
美文网首页python
编程之Python扫雷(4)

编程之Python扫雷(4)

作者: 东方支柱 | 来源:发表于2018-12-30 10:34 被阅读31次

#主程序

s="44" #先打开一个

while s!="qq":

    if len(s)>=2:

        r,c=int(s[0])+1,int(s[1])+1

        if r<1 or r>ps or c<1 c>ps:

            r,c=4,4

        s=s[2:]

        if openm(r,c):

            if p():

                break

        else:

            s="qq"

            print("over")

    if len(s)<2:

        s=input() #可以连续输入,如899897

相关文章

网友评论

    本文标题:编程之Python扫雷(4)

    本文链接:https://www.haomeiwen.com/subject/rexvlqtx.html