thread: us 由 int 类型改为 Color

This commit is contained in:
Calcitem 2020-10-25 11:17:11 +08:00
parent f860086aa8
commit 85cdd2d0ed
3 changed files with 5 additions and 5 deletions

View File

@ -362,10 +362,10 @@ void Thread::analyze(Color c)
total = nbwin + nwwin + ndraw;
if (total == 0) {
if (total == 0) {
bwinrate = 0;
wwinrate = 0;
drawrate = 0;
drawrate = 0;
} else {
bwinrate = (float)nbwin * 100 / total;
wwinrate = (float)nwwin * 100 / total;

View File

@ -131,7 +131,7 @@ public:
Value bestvalue { VALUE_ZERO };
Value lastvalue { VALUE_ZERO };
int us {1};
Color us { BLACK };
private:
int timeLimit;

View File

@ -278,10 +278,10 @@ public slots:
void createAiThreads()
{
aiThread[BLACK] = new Thread(0);
aiThread[BLACK]->us = 1;
aiThread[BLACK]->us = BLACK;
aiThread[WHITE] = new Thread(0);
aiThread[WHITE]->us = 2;
aiThread[WHITE]->us = WHITE;
}
void startAiThreads()