服务端
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 8 14:03:09 2021
@author: Administrator
"""
import pygame
import sys
from pygame.locals import *
from collections import Counter
from socket import *
from time import ctime
import json
import select
import socket
#界面初始化
screen=pygame.display.set_mode((400,450))
pygame.display.set_caption('五子棋')
pygame.init()
#图片导入
img_board=pygame.image.load('F:/images/五子棋/chess_board.png')
img_bchess=pygame.image.load('F:/images/五子棋/black_chess.jpg')
img_wchess=pygame.image.load('F:/images/五子棋/white_chess.jpg')
#颜色
white=(255,255,255)
black=(0,0,0)
#用于传送的数据
msg=[]
#棋盘定义
chess_board=[[]]
def set_chess_board():
x,y=0,0
while True:
if x==400:
x=0
y+=40
if y<400:
chess_board.append([])
if y==400: