the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: tsito
Version: 0.8.4
Revision: 1001
GCC: 4.0
Maintainer: Matthias Neeracher
Provides: xiangqi
Source: mirror:sourceforge:xiangqi-engine/%n-%v.tar.gz
Source-MD5: 198b7313067959f7530d569ca9b48a1e
BuildDepends: fink (>= 0.24.12-1)
PatchFile: %n.patch
PatchFile-MD5: cd9040065dffcc927f5e44a882c5a3e3
ConfigureParams: --mandir=%i/share/man
DocFiles: AUTHORS COPYING NEWS README TODO
Description: Engine for Xiangqi (Chinese Chess)
DescDetail: <<
A Chinese Chess engine, designed to work with CXBoard.
The TSITO Chinese Chess Engine is the first of its kind; it was
designed to be able to communicate to interfaces (graphical or
otherwise) through a standard protocol. All other Chinese Chess
engines that the author is aware of were designed with the interface
embedded into the engine or to communicate through an undocumented set
of commands. There are numerous advantages to keeping the interface
separate from the engine; for instance, an engine author need not
concern themselves with major usability concerns so long as the
engine is conformant since these problems are taken care of.
<<
DescPort: <<
<<
Homepage: http://xiangqi-engine.sourceforge.net
License: GPL
diff -ru tsito-0.8.4-orig/src/Engine.cpp tsito-0.8.4/src/Engine.cpp
--- tsito-0.8.4-orig/src/Engine.cpp Fri Nov 7 18:19:03 2003
+++ tsito-0.8.4/src/Engine.cpp Fri Nov 7 18:25:21 2003
@@ -15,7 +15,7 @@
//#include
-//#include
+#include
#ifdef HAVE_CONFIG_H
# include "../config.h"
@@ -200,7 +200,7 @@
// database, if so then use the move returned (if legal).
myTimer = Timer::timerForColor(board->sideToMove());
- //struct timeb startTime;
+ struct timeval startTime;
if (searchState == BETWEEN_SEARCHES)
{
searchState = SEARCHING;
@@ -208,7 +208,7 @@
//myTimer->startTimer();
transposTable->flush();
killer1.clear(); killer2.clear();
- ftime(&startTime);
+ gettimeofday(&startTime, NULL);
nodeCount = 0;
}
if (useOpeningBook && openingBook != NULL && openingBook->valid())
@@ -246,11 +246,11 @@
principleVariation = iterPV;
if (displayThinking)
{
- struct timeb nowTime;
+ struct timeval nowTime;
int plyMod = (searchAborted ? -1:0);
- ftime(&nowTime);
+ gettimeofday(&nowTime, NULL);
cout << (searchAborted ? "*":"") << (i+plyMod) << "\t" << result << "\t" << nodeCount << "\t"
- << (100*(nowTime.time - startTime.time)) + ((nowTime.millitm - startTime.millitm)/10) << "\t"
+ << (100*(nowTime.tv_sec - startTime.tv_sec)) + ((nowTime.tv_usec - startTime.tv_usec)/10000) << "\t"
<< variationText(principleVariation) << endl;
cout.flush();
}
Only in tsito-0.8.4/src: Engine.cpp~