public bool HuiQi()//悔棋 { if (q1 != null && q2 != null) { q1.Qs = QiSe.Null; q2.Qs = QiSe.Null; q1.Paint(); q2.Paint(); q1 = null; q2 = null; return(true); } return(false); }
public void ThreadProc()//接收线程函数 { while (bt) { if (start) { if (isServer) { QiZi qz = localnet.Recv(); if (qz != null) { int i = qz.Rect.X / rectPix; int j = qz.Rect.Y / rectPix; QzArr[i, j] = qz; qz.Paint(); if (ShuYin()) { bt = false; localnet.Close(); shu = true; } this.turn = QiSe.Bai; } } else { QiZi qz = localnet.Recv(); if (qz != null) { int i = qz.Rect.X / rectPix; int j = qz.Rect.Y / rectPix; QzArr[i, j] = qz; qz.Paint(); if (ShuYin()) { bt = false; localnet.Close(); shu = true; } this.turn = QiSe.Hei; } } } } }