コード例 #1
0
ファイル: delete_fct.c プロジェクト: wtrembla/New_42sh
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);
}
コード例 #2
0
ファイル: main.c プロジェクト: iPodLinux-Community/ZacZilla
/* 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("", "");
	}
}
コード例 #3
0
ファイル: delete_fct.c プロジェクト: wtrembla/New_42sh
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();
	}
}
コード例 #4
0
ファイル: main.c プロジェクト: iPodLinux-Community/ZacZilla
void new_tuxchess_window(void)
{
	init();
	init_historic();
	open_tuxchess_window();
}