本文整理汇总了C#中ChessColor类的典型用法代码示例。如果您正苦于以下问题:C#ChessColor类的具体用法?C#ChessColor怎么用?C#ChessColor使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:miniMax
///
///Purpose:Toperformtheminimaxalgorithmtodeterminechessmove
///
///
///
///char[]boardtorepresentthemove
///
publicstaticchar[]miniMax(char[]SRFen,ChessColorcolor)
{
TimeSpanmaxTime=TimeSpan.FromMilliseconds(5500);
Char[]initialBoard=(char[])SRFen.Clone();
boolwhite;
intalpha=-10000;
intbeta=10000;
intcutoff=4;
if(color==ChessColor.White)white=true;
elsewhite=false;
intdepth=0;
Stopwatchtimer=newStopwatch();
timer.Start();
inth;
h=minValue(refSRFen,depth+1,white,alpha,beta,cutoff,reftimer);
if(h==-5000)
returnSRFen;
char[]bestSoFar=(char[])SRFen.Clone();
while(timer.Elapsed原文链接:http://www.jxszl.com/biancheng/C/556739.html