python编写交互式井字棋游戏ai
编写环境:windows 10 64x Spyder python3.8
源代码:
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 10 15:21:34 2021
@author: 小良子
"""
import time,random
chess=[' ',' ',' ',' ',' ',' ',' ',' ',' ']
def chess_index(x,y):
n=(x-1)*3+y
return n
def realplay
原创
2021-12-11 02:49:02 ·
3600 阅读 ·
2 评论