int main(int argc, char **argv) { int *tabstick = NULL; if (argv[1] && (my_str_isnum(argv[1]) == 0)) { tabstick = create_sticktab(argv[1]); if (!tabstick) return (0); while (42) { choose_line(tabstick); aff_sticks(tabstick, my_get_nbr(argv[1])); if (!verif_if_lose(tabstick, my_get_nbr(argv[1]))) { my_putstr("You lose . . .\n\n"); return (0); } rand_line(tabstick, my_get_nbr(argv[1])); if (!verif_if_lose(tabstick, my_get_nbr(argv[1]))) { my_putstr("You win!\n\n"); return (0); } } } else my_putstr("\n\tUse a number for argument 1.\n\n"); return (0); }
int conversion() { int base_len; char *base; int position; base_len = my_get_nbr(2); base = lib_base(base_len); }
int define_number_line(char *str, int const line_max) { int i = 0; if (my_str_isnum(str) == 1) return (0); i = my_get_nbr(str); if (i > line_max) return (0); return (i); }
void count_ty(t_all *a, int s) { char *str; int i; if ((str = malloc(s * sizeof(char))) == NULL) my_exit("Error -> Malloc failed"); i = 0; my_open(a); while (a->c != '\n') { my_read(a); str[i] = a->c; i++; } str[i] = 0; a->c = 1; a->ty = my_get_nbr(str); }