/*
 * analyst.h -- Functions to keep a record of engine analysis
 * $Id$
 *
 * Copyright 1995 Free Software Foundation, Inc.
 *
 * ------------------------------------------------------------------------
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 * ------------------------------------------------------------------------
 */
#include <windows.h>
int AnalystStartClock();
char *AnalystData(char *s);

void StartBlunderAnalyst();    // start blunder analysis
void EndAnalyst();      // end blunder analysis


void AnalystTimerEvent();   // has timer event

int BlunderAnalystOptionsPopup(HWND hwnd);


void HasTactic(int t);  // implemented in whistory.c
void HasMate(int m);  // implemented in whistory.c
void CurrentScore(int s);

void AnalystTacticSetBlack(int b);
void AnalystTacticMatch();

void StartCoachMatch(int machine_white);


#define NUM_LINE_RECORDED 4
typedef struct AnalystStruct{
    // analyst option
    int mode;
    int timer_time;
    int score_threshold;
    char white_moves;
    char black_moves;
    char delete_old_comment;
    char absolute_score;

    
    // below is data keeping variable
    int message_last_score;
    int game_last_score;
    int is_analyzing;
    int last_move;
    int tactic_last_move;
    int tactic_last_score;
    int tactic_latest_score;
    int tactic_was_black_side;
    int tactic_black_side;

    
    int has_tick; // keep track if a new tick has elapsed or not
    int start_move; // blunder analyst to start from this move
#define ANALYST_LINE_BUF 75
    char analysis_line[NUM_LINE_RECORDED][ANALYST_LINE_BUF];// hope this is enough
    char analysis_moves[NUM_LINE_RECORDED][MOVE_LEN];
    char analysis_buf[NUM_LINE_RECORDED*ANALYST_LINE_BUF];

} AnalystStruct;

extern AnalystStruct analyst;
