<commit_before>#ifndef Clock_H
#define Clock_H

#include <array>
#include <chrono>

#include "Color.h"

class Game_Result;
class CECP_Mediator;

//! This class represents the dual-clock game timers used in tournament chess.
class Clock
{
    public:
        // Game clock settings: total time, moves to reset clock, time increment per move
        Clock(double duration_seconds = 0.0,
              size_t moves_to_reset = 0,
              double increment_seconds = 0.0,
              Color starting_turn = WHITE,
              bool clock_stops_game = true);

        Game_Result punch(); // start/stop both clocks
        void stop(); // stop both clocks
        void start(); // resume after stop()

        double time_left(Color color) const;
        size_t moves_to_reset(Color color) const;
        Color running_for() const;
        double running_time_left() const;
        bool is_running() const;

        std::chrono::system_clock::time_point game_start_date_and_time() const;
        double initial_time() const;
        size_t moves_to_reset() const;
        double increment() const;

    private:
        using fractional_seconds = std::chrono::duration<double>;

        std::array<fractional_seconds, 2> timers;
        std::array<size_t, 2> moves_to_reset_clocks;

        fractional_seconds initial_start_time;
        fractional_seconds increment_time;
        size_t move_count_reset;

        Color whose_turn;
        bool use_clock;
        bool use_reset;
        bool clocks_running;
        bool local_clock_stoppage;
        std::chrono::system_clock::time_point game_start_date_time;

        std::chrono::steady_clock::time_point time_previous_punch;

        // When playing with outside interfaces, use the external clock
        friend class CECP_Mediator;
        void set_time(Color player, double new_time_seconds);
};

#endif // Clock_H<commit_msg>Delete useless comments<commit_after>#ifndef Clock_H
#define Clock_H

#include <array>
#include <chrono>

#include "Color.h"

class Game_Result;
class CECP_Mediator;

//! This class represents the dual-clock game timers used in tournament chess.
class Clock
{
    public:
        Clock(double duration_seconds = 0.0,
              size_t moves_to_reset = 0,
              double increment_seconds = 0.0,
              Color starting_turn = WHITE,
              bool clock_stops_game = true);

        Game_Result punch();
        void stop();
        void start();

        double time_left(Color color) const;
        size_t moves_to_reset(Color color) const;
        Color running_for() const;
        double running_time_left() const;
        bool is_running() const;

        std::chrono::system_clock::time_point game_start_date_and_time() const;
        double initial_time() const;
        size_t moves_to_reset() const;
        double increment() const;

    private:
        using fractional_seconds = std::chrono::duration<double>;

        std::array<fractional_seconds, 2> timers;
        std::array<size_t, 2> moves_to_reset_clocks;

        fractional_seconds initial_start_time;
        fractional_seconds increment_time;
        size_t move_count_reset;

        Color whose_turn;
        bool use_clock;
        bool use_reset;
        bool clocks_running;
        bool local_clock_stoppage;

        std::chrono::system_clock::time_point game_start_date_time;
        std::chrono::steady_clock::time_point time_previous_punch;

        friend class CECP_Mediator;
        void set_time(Color player, double new_time_seconds);
};

#endif // Clock_H
{'fraction_non_alphanumeric': 0.07969586032103633, 'fraction_numerical': 0.003942551393973529, 'mean_word_length': 2.770700636942675, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1029628', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1017, 'n_words': 268}