* ----------------------------------------------------------------------
* Copyright (c) 1993, 1994, 1995 Matthias Mutz
* Copyright (c) 1999 Michael Vanier and the Free Software Foundation
+ * Copyright (c) 2008, 2013, 2014 Yann Dirson and the Free Software Foundation
*
* GNU SHOGI is based on GNU CHESS
*
#endif
if (flag.timeout)
- ShowMessage("timeout");
+ dsp->ShowMessage("timeout");
}
struct timeval tv;
#endif
- PollForInput();
+ dsp->PollForInput();
#ifdef HAVE_GETTIMEOFDAY
gettimeofday(&tv, NULL);
#ifdef QUIETBACKGROUND
if (!background)
#endif
- UpdateClocks();
+ dsp->UpdateClocks();
}
}
+
+
+void
+SetTimeControl(void)
+{
+ if (TCflag)
+ {
+ TimeControl.moves[black] = TimeControl.moves[white] = TCmoves;
+ TimeControl.clock[black] += 6000L * TCminutes + TCseconds * 100;
+ TimeControl.clock[white] += 6000L * TCminutes + TCseconds * 100;
+ }
+ else
+ {
+ TimeControl.moves[black] = TimeControl.moves[white] = 0;
+ TimeControl.clock[black] = TimeControl.clock[white] = 0;
+ }
+
+ flag.onemove = (TCmoves == 1);
+ et = 0;
+ ElapsedTime(COMPUTE_AND_INIT_MODE);
+}