void display_line(void) { t_hist **historic; historic = init_historic(0); tputs(tgetstr("cd", NULL), 1, aff_c); tputs(tgetstr("sc", NULL), 1, aff_c); aff_str((*historic)->copy->line + (*historic)->copy->index + 1); tputs(tgetstr("rc", NULL), 1, aff_c); }
/* Set up a new game */ void new_game() { end = 0; pz_close_window(end_wid); init(); gen_moves(); max_time = 100000;//1 << 25; max_depth = 1; init_historic(); print_board(); if (!is_mini) { draw_historic(); } else { draw_message("", ""); } }
void apply_delete(void) { int win_size; t_hist **historic; historic = init_historic(0); if ((*historic)->copy->index != -1) { (*historic)->copy->line = update_line((*historic)->copy->line, (*historic)->copy->index); if ((win_size = check_beginning((*historic)->copy->index))) { tputs(tgetstr("up", NULL), 1, aff_c); tputs(tgoto(tgetstr("ch", NULL), 0, win_size), 1, aff_c); } else tputs(tgetstr("le", NULL), 1, aff_c); tputs(tgetstr("dc", NULL), 1, aff_c); (*historic)->copy->index -= 1; (*historic)->copy->size = ft_strlen((*historic)->copy->line); display_line(); } }
void new_tuxchess_window(void) { init(); init_historic(); open_tuxchess_window(); }