From 7b316f96d850ca6807fb2a6e86f0c35a0c7d9858 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Mon, 20 Jan 2014 22:02:01 +0100 Subject: [PATCH] Move SetTimeControl into tctrl.c. Nothing display/interface-specific here. --- gnushogi/commondsp.c | 21 --------------------- gnushogi/tcontrl.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 6734e22..86217bb 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1963,24 +1963,3 @@ InputCommand(char *command) } } } - - -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); -} diff --git a/gnushogi/tcontrl.c b/gnushogi/tcontrl.c index 00a2032..2ce4416 100644 --- a/gnushogi/tcontrl.c +++ b/gnushogi/tcontrl.c @@ -414,3 +414,24 @@ ElapsedTime(ElapsedTime_mode iop) 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); +} -- 1.7.0.4