ne gere pas bien la cas d'un tetraminos sur une seul ligne
This commit is contained in:
Binary file not shown.
BIN
.fillit.h.swp
BIN
.fillit.h.swp
Binary file not shown.
20
a.out.dSYM/Contents/Info.plist
Normal file
20
a.out.dSYM/Contents/Info.plist
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.a.out</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
a.out.dSYM/Contents/Resources/DWARF/a.out
Normal file
BIN
a.out.dSYM/Contents/Resources/DWARF/a.out
Normal file
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/04/14 15:20:53 by hulamy #+# #+# */
|
||||
/* Updated: 2019/04/15 16:06:37 by hulamy ### ########.fr */
|
||||
/* Updated: 2019/04/15 16:14:46 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -87,7 +87,7 @@ int fill_list(char **square, t_fillist *list)
|
||||
return (1);
|
||||
}
|
||||
|
||||
int push_to_end(t_fillist **list)
|
||||
int add_to_list(char **square, t_fillist **list)
|
||||
{
|
||||
t_fillist *tmp;
|
||||
|
||||
@@ -98,25 +98,18 @@ int push_to_end(t_fillist **list)
|
||||
else
|
||||
tmp->next = *list;
|
||||
*list = tmp;
|
||||
return (1);
|
||||
}
|
||||
|
||||
int add_to_list(char **square, t_fillist **list)
|
||||
{
|
||||
if (!(push_to_end(list)))
|
||||
return (0);
|
||||
fill_list(square, *list);
|
||||
return (1);
|
||||
}
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
static t_fillist *list = NULL;
|
||||
static t_fillist *list = NULL; // avant d'appeller add_to_list il faut declarer un pointeur static vers la structure
|
||||
int i;
|
||||
|
||||
if (ac > 4)
|
||||
{
|
||||
add_to_list(++av, &list);
|
||||
add_to_list(++av, &list); // l'appel de la fonction se fait avec un carre valide de 4*4 et l'adresse du pointeur vers la liste
|
||||
if (ac == 9)
|
||||
add_to_list(av += 4, &list);
|
||||
while (list && (i = -1))
|
||||
|
||||
Reference in New Issue
Block a user