src/chess/rules.c

changeset 103
a2a68fd9f6cc
parent 100
685af47592b5
child 105
a991ea61f0e2
equal deleted inserted replaced
102:463c648e6a9b 103:a2a68fd9f6cc
788 788
789 unsigned total_time = gameinfo->time; 789 unsigned total_time = gameinfo->time;
790 unsigned used_time = 0; 790 unsigned used_time = 0;
791 suseconds_t micros = 0; 791 suseconds_t micros = 0;
792 792
793 /* when this is a 0+X game, the clock starts with the increment */
794 if (gameinfo->time == 0) {
795 total_time += gameinfo->addtime;
796 }
797
793 /* go through all already played moves */ 798 /* go through all already played moves */
794 unsigned first_move = move_number % 2; 799 unsigned first_move = move_number % 2;
795 unsigned next_move = move_number; 800 unsigned next_move = move_number;
796 if (next_move > gamestate->movecount) next_move = gamestate->movecount; 801 if (next_move > gamestate->movecount) next_move = gamestate->movecount;
797 for (unsigned i = first_move ; i < next_move ; i += 2) { 802 for (unsigned i = first_move ; i < next_move ; i += 2) {

mercurial