├── chall02 ├── sys ├── morse.txt ├── aguiot--.py ├── solution.py ├── hbaudet.py ├── mbourand.py ├── charoua.py ├── mchardin.py ├── hben-yah.py └── jergauth.py ├── chall04 ├── tests │ ├── tmp │ │ ├── etieberg.txt │ │ ├── hthomas.txt │ │ ├── tbailly-.txt │ │ ├── gmolin.txt │ │ ├── hopham.txt │ │ ├── ksappi.txt │ │ ├── mdesta.txt │ │ ├── sadawi.txt │ │ ├── srouhe.txt │ │ ├── vtran.txt │ │ ├── alcohen.txt │ │ ├── bleplat.txt │ │ ├── cdittric.txt │ │ ├── charoua.txt │ │ ├── cyrlemai.txt │ │ ├── dmukaliy.txt │ │ ├── frdescam.txt │ │ ├── fyusuf-a.txt │ │ ├── hbaudet.txt │ │ ├── jmartel.txt │ │ ├── jnovotny.txt │ │ ├── juligonz.txt │ │ ├── lsarrazi.txt │ │ ├── mlaraki.txt │ │ ├── mtuomine.txt │ │ ├── ptuukkan.txt │ │ ├── tdawson.txt │ │ ├── vkuikka.txt │ │ ├── phakakos.txt │ │ ├── osalmine.txt │ │ ├── xtang.txt │ │ ├── ltouret.txt │ │ ├── rjaakonm.txt │ │ ├── spentti.txt │ │ └── mlindhol.txt │ ├── test03_out.txt │ ├── test03_in.txt │ ├── test02_out.txt │ ├── test02_in.txt │ ├── test00_out.txt │ ├── test00_in.txt │ ├── test01_out.txt │ ├── test01_in.txt │ ├── sand.py │ ├── expected.txt │ ├── sand2.py │ └── auto-eval.sh ├── traces │ ├── bleplat.txt │ ├── cdittric.txt │ ├── charoua.txt │ ├── cyrlemai.txt │ ├── frdescam.txt │ ├── fyusuf-a.txt │ ├── hbaudet.txt │ ├── jmartel.txt │ ├── juligonz.txt │ ├── lsarrazi.txt │ ├── mlaraki.txt │ ├── ltouret.txt │ ├── etieberg.txt │ ├── hthomas.txt │ └── tbailly-.txt ├── etieberg.py ├── lsarrazi.py ├── hbaudet.py ├── cdittric.py ├── hthomas.py ├── frdescam.py ├── juligonz.py └── ltouret.py ├── battlespace ├── rendus │ └── jun2020 │ │ ├── asurrel │ │ └── auteur │ │ ├── hben-yah │ │ ├── auteur │ │ └── libft │ │ │ └── srcs │ │ │ ├── math │ │ │ ├── ft_abs.c │ │ │ ├── ft_max.c │ │ │ ├── ft_min.c │ │ │ └── ft_ldabs.c │ │ │ ├── boolean │ │ │ ├── ft_isascii.c │ │ │ ├── ft_isdigit.c │ │ │ ├── ft_islower.c │ │ │ ├── ft_isprint.c │ │ │ ├── ft_isupper.c │ │ │ ├── ft_isspace_wnt.c │ │ │ ├── ft_isalnum.c │ │ │ └── ft_isalpha.c │ │ │ ├── string │ │ │ ├── ft_strclr.c │ │ │ └── ft_striter.c │ │ │ ├── output │ │ │ ├── ft_putchar.c │ │ │ ├── ft_putchar_fd.c │ │ │ └── ft_putstrtab.c │ │ │ └── misc │ │ │ ├── ft_tolower.c │ │ │ ├── ft_toupper.c │ │ │ ├── ft_intswap.c │ │ │ └── ft_charswap.c │ │ ├── mahaffne │ │ └── auteur │ │ ├── roalvare │ │ ├── .gitignore │ │ ├── libft │ │ │ ├── .gitignore │ │ │ ├── math │ │ │ │ └── ft_abs.c │ │ │ ├── is │ │ │ │ ├── ft_isascii.c │ │ │ │ ├── ft_isdigit.c │ │ │ │ └── ft_isprint.c │ │ │ ├── put │ │ │ │ └── ft_putchar_fd.c │ │ │ ├── conv │ │ │ │ ├── ft_tolower.c │ │ │ │ └── ft_toupper.c │ │ │ └── mem │ │ │ │ └── ft_bzero.c │ │ └── makefile │ │ ├── juligonz │ │ └── lib │ │ │ └── libft │ │ │ ├── libft.a │ │ │ ├── ft_abs.o │ │ │ ├── ft_atoi.o │ │ │ ├── ft_bzero.o │ │ │ ├── ft_itoa.o │ │ │ ├── ft_labs.o │ │ │ ├── ft_llabs.o │ │ │ ├── ft_split.o │ │ │ ├── ft_calloc.o │ │ │ ├── ft_isalnum.o │ │ │ ├── ft_isalpha.o │ │ │ ├── ft_isascii.o │ │ │ ├── ft_isblank.o │ │ │ ├── ft_iscntrl.o │ │ │ ├── ft_isdigit.o │ │ │ ├── ft_isgraph.o │ │ │ ├── ft_islower.o │ │ │ ├── ft_isprint.o │ │ │ ├── ft_isspace.o │ │ │ ├── ft_isupper.o │ │ │ ├── ft_lstiter.o │ │ │ ├── ft_lstlast.o │ │ │ ├── ft_lstmap.o │ │ │ ├── ft_lstnew.o │ │ │ ├── ft_lstsize.o │ │ │ ├── ft_memccpy.o │ │ │ ├── ft_memchr.o │ │ │ ├── ft_memcmp.o │ │ │ ├── ft_memcpy.o │ │ │ ├── ft_memdel.o │ │ │ ├── ft_memmove.o │ │ │ ├── ft_memset.o │ │ │ ├── ft_putchar.o │ │ │ ├── ft_putendl.o │ │ │ ├── ft_putnbr.o │ │ │ ├── ft_putstr.o │ │ │ ├── ft_strcat.o │ │ │ ├── ft_strchr.o │ │ │ ├── ft_strclr.o │ │ │ ├── ft_strcmp.o │ │ │ ├── ft_strcpy.o │ │ │ ├── ft_strdel.o │ │ │ ├── ft_strdup.o │ │ │ ├── ft_strequ.o │ │ │ ├── ft_striter.o │ │ │ ├── ft_strjoin.o │ │ │ ├── ft_strlcat.o │ │ │ ├── ft_strlcpy.o │ │ │ ├── ft_strlen.o │ │ │ ├── ft_strmap.o │ │ │ ├── ft_strmapi.o │ │ │ ├── ft_strncat.o │ │ │ ├── ft_strncmp.o │ │ │ ├── ft_strncpy.o │ │ │ ├── ft_strndup.o │ │ │ ├── ft_strnequ.o │ │ │ ├── ft_strnew.o │ │ │ ├── ft_strnstr.o │ │ │ ├── ft_strrchr.o │ │ │ ├── ft_strstr.o │ │ │ ├── ft_strtrim.o │ │ │ ├── ft_substr.o │ │ │ ├── ft_tolower.o │ │ │ ├── ft_toupper.o │ │ │ ├── ft_in_charset.o │ │ │ ├── ft_isnumber.o │ │ │ ├── ft_isxdigit.o │ │ │ ├── ft_itoa_base.o │ │ │ ├── ft_lstclear.o │ │ │ ├── ft_lstdelone.o │ │ │ ├── ft_putchar_fd.o │ │ │ ├── ft_putendl_fd.o │ │ │ ├── ft_putnbr_fd.o │ │ │ ├── ft_putstr_fd.o │ │ │ ├── ft_striteri.o │ │ │ ├── ft_lstadd_back.o │ │ │ ├── ft_lstadd_front.o │ │ │ ├── ft_lstpop_front.o │ │ │ ├── ft_print_memory.o │ │ │ ├── ft_putnbr_base.o │ │ │ ├── ft_putnbr_base_fd.o │ │ │ ├── ft_valid_extention.o │ │ │ ├── gnl │ │ │ └── get_next_line.o │ │ │ ├── ft_printf │ │ │ └── srcs │ │ │ │ ├── parse.o │ │ │ │ ├── ft_dprintf.o │ │ │ │ ├── ft_printf.o │ │ │ │ ├── ft_sprintf.o │ │ │ │ ├── put │ │ │ │ ├── put_e.o │ │ │ │ ├── put_g.o │ │ │ │ ├── put_dec.o │ │ │ │ ├── put_hex.o │ │ │ │ ├── put_oct.o │ │ │ │ ├── put_ptr.o │ │ │ │ └── put_double.o │ │ │ │ ├── read_flags.o │ │ │ │ ├── convs │ │ │ │ ├── conv_c.o │ │ │ │ ├── conv_d.o │ │ │ │ ├── conv_e.o │ │ │ │ ├── conv_f.o │ │ │ │ ├── conv_g.o │ │ │ │ ├── conv_i.o │ │ │ │ ├── conv_n.o │ │ │ │ ├── conv_o.o │ │ │ │ ├── conv_p.o │ │ │ │ ├── conv_s.o │ │ │ │ ├── conv_u.o │ │ │ │ ├── conv_mod.o │ │ │ │ ├── conv_x_lowcase.o │ │ │ │ └── conv_x_upcase.o │ │ │ │ ├── double_utils.o │ │ │ │ ├── ft_asprintf.o │ │ │ │ ├── ft_strdup_cat.o │ │ │ │ ├── write_buffer.o │ │ │ │ ├── double_utils_2.o │ │ │ │ ├── cast_len_modifier.o │ │ │ │ └── double_validation.o │ │ │ ├── ft_abs.c │ │ │ ├── ft_isascii.c │ │ │ ├── ft_labs.c │ │ │ ├── ft_isdigit.c │ │ │ ├── ft_isprint.c │ │ │ ├── ft_llabs.c │ │ │ ├── ft_strclr.c │ │ │ ├── ft_iscntrl.c │ │ │ ├── ft_putchar.c │ │ │ ├── ft_putnbr.c │ │ │ ├── ft_bzero.c │ │ │ ├── ft_isalpha.c │ │ │ ├── ft_islower.c │ │ │ ├── ft_isupper.c │ │ │ ├── ft_memdel.c │ │ │ ├── ft_putchar_fd.c │ │ │ ├── ft_putstr.c │ │ │ ├── ft_tolower.c │ │ │ ├── ft_toupper.c │ │ │ ├── ft_isalnum.c │ │ │ ├── ft_isgraph.c │ │ │ ├── ft_putendl.c │ │ │ ├── ft_putstr_fd.c │ │ │ ├── ft_striter.c │ │ │ └── ft_putnbr_base.c │ │ ├── cclaude │ │ ├── map │ │ └── Makefile │ │ ├── cdittric │ │ └── main.h │ │ ├── memartin │ │ └── libft │ │ │ ├── ft_putchar.c │ │ │ └── ft_isdigit.c │ │ ├── hbaudet │ │ └── libft │ │ │ ├── ft_putchar_fd.c │ │ │ ├── ft_putstr_fd.c │ │ │ ├── ft_isascii.c │ │ │ ├── ft_isdigit.c │ │ │ ├── ft_islower.c │ │ │ ├── ft_isprint.c │ │ │ ├── ft_isupper.c │ │ │ ├── ft_tolower.c │ │ │ └── ft_toupper.c │ │ └── mchardin │ │ └── libft │ │ ├── is │ │ ├── ft_isascii.c │ │ ├── ft_isdigit.c │ │ ├── ft_isprint.c │ │ └── ft_iswhitespace.c │ │ ├── put │ │ └── ft_putchar_fd.c │ │ └── conv │ │ ├── ft_tolower.c │ │ └── ft_toupper.c ├── grids │ └── jun2020 │ │ ├── grid_an │ │ ├── grid_ax │ │ ├── grid_mn │ │ ├── grid_mx │ │ ├── grid_nn │ │ └── grid_nx └── results │ └── jun2020 │ ├── cclaude │ ├── framel │ ├── hben-yah │ ├── kibotrel │ ├── memartin │ ├── asurrel │ ├── cdittric │ ├── hbaudet │ ├── mahaffne │ ├── mchardin │ ├── roalvare │ ├── juligonz │ └── GLOBAL ├── chall01 ├── a.out ├── .ymarcill.py.swp ├── test.c ├── esoulard.c ├── jgroc-de.c ├── ibouchla.c ├── charoua.c ├── etieberg.c ├── ele-goug.c ├── cdittric.c ├── hben-yah.c ├── mbourand.c ├── roalvare.c ├── askobins.c ├── kchadir.c ├── dgalanop.c ├── nforay.c ├── cclaude.c ├── dtheo.c ├── varnaud.c ├── mlaraki.c ├── nclabaux.c ├── alesanto.c ├── qlouisia.c ├── eparisot.c ├── ymarcill.py ├── rturcey.c ├── snicolet.c ├── fel-mazo.c ├── expected_output.txt ├── main.c └── bapmarti.c ├── chall03 ├── server │ └── Dockerfile ├── trace.txt ├── aguiot--.go ├── juligonz.go └── etieberg.go └── chall00 ├── emartine.c ├── mchardin.c ├── fratajcz.c ├── nkhaldi.c ├── gel-kasr.c ├── kibotrel.c ├── jergauth.c ├── mle-moni.c ├── takiapo.c ├── etieberg.c ├── roalvare.c ├── jgiron.c ├── ibouchla.c ├── cde-laro.c ├── mbourand.c ├── jgroc-de.c ├── hben-yah.c ├── tmerli.c ├── dsy.c ├── charmstr.c ├── eparisot.c ├── jriallot.c ├── stoupin.c ├── cyhuet.c ├── sadahan.c ├── ymarcill.c ├── charoua.c ├── alesanto.c └── esidelar.c /chall02/sys: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chall04/tests/tmp/etieberg.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chall04/tests/tmp/hthomas.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chall04/tests/test03_out.txt: -------------------------------------------------------------------------------- 1 | . 2 | -------------------------------------------------------------------------------- /chall04/tests/test03_in.txt: -------------------------------------------------------------------------------- 1 | 1 2 | . 3 | -------------------------------------------------------------------------------- /chall04/traces/bleplat.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/cdittric.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/charoua.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/cyrlemai.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/frdescam.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/fyusuf-a.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/hbaudet.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/jmartel.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/juligonz.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/lsarrazi.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/traces/mlaraki.txt: -------------------------------------------------------------------------------- 1 | Diff: OK 2 | -------------------------------------------------------------------------------- /chall04/tests/test02_out.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | . 4 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/asurrel/auteur: -------------------------------------------------------------------------------- 1 | THE-ORDER 2 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/auteur: -------------------------------------------------------------------------------- 1 | hben-yah 2 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mahaffne/auteur: -------------------------------------------------------------------------------- 1 | mahaffne 2 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/.gitignore: -------------------------------------------------------------------------------- 1 | btsp 2 | *.o -------------------------------------------------------------------------------- /chall04/tests/test02_in.txt: -------------------------------------------------------------------------------- 1 | 3 2 | 3 | 4 | . 5 | -------------------------------------------------------------------------------- /chall04/tests/test00_out.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | -------------------------------------------------------------------------------- /chall04/tests/test00_in.txt: -------------------------------------------------------------------------------- 1 | 5 2 | ..... 3 | # 4 | # 5 | 6 | . 7 | -------------------------------------------------------------------------------- /chall01/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/chall01/a.out -------------------------------------------------------------------------------- /chall01/.ymarcill.py.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/chall01/.ymarcill.py.swp -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/.gitignore: -------------------------------------------------------------------------------- 1 | /test/* 2 | *.out 3 | test.c 4 | .vscode/ 5 | test_*.c 6 | *.o 7 | libft.a 8 | main.c -------------------------------------------------------------------------------- /chall03/server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:latest 2 | 3 | WORKDIR /app 4 | COPY . . 5 | RUN go build -o main . 6 | EXPOSE 8080 7 | CMD ["./main"] 8 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/libft.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/libft.a -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_abs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_abs.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_atoi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_atoi.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_bzero.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_bzero.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_itoa.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_itoa.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_labs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_labs.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_llabs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_llabs.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_split.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_split.o -------------------------------------------------------------------------------- /chall04/traces/ltouret.txt: -------------------------------------------------------------------------------- 1 | 0a1 2 | > gimme map size 3 | 5a7 4 | > gimme map size 5 | 15a18 6 | > gimme map size 7 | 18a22 8 | > gimme map size 9 | Diff: KO 10 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_calloc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_calloc.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isalnum.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isalnum.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isalpha.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isalpha.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isascii.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isascii.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isblank.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isblank.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_iscntrl.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_iscntrl.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isdigit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isdigit.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isgraph.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isgraph.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_islower.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_islower.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isprint.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isprint.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isspace.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isspace.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isupper.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isupper.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstiter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstiter.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstlast.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstlast.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstmap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstmap.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstnew.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstnew.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstsize.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstsize.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memccpy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_memccpy.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memchr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_memchr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memcmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_memcmp.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memcpy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_memcpy.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memdel.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_memdel.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memmove.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_memmove.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memset.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_memset.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putchar.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putchar.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putendl.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putendl.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putstr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putstr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strcat.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strcat.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strchr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strchr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strclr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strclr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strcmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strcmp.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strcpy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strcpy.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strdel.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strdel.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strdup.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strdup.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strequ.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strequ.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_striter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_striter.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strjoin.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strjoin.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strlcat.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strlcat.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strlcpy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strlcpy.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strlen.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strlen.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strmap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strmap.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strmapi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strmapi.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strncat.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strncat.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strncmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strncmp.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strncpy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strncpy.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strndup.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strndup.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strnequ.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strnequ.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strnew.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strnew.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strnstr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strnstr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strrchr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strrchr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strstr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strstr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strtrim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_strtrim.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_substr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_substr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_tolower.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_tolower.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_toupper.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_toupper.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_in_charset.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_in_charset.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isnumber.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isnumber.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isxdigit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_isxdigit.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_itoa_base.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_itoa_base.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstclear.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstclear.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstdelone.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstdelone.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putchar_fd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putchar_fd.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putendl_fd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putendl_fd.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr_fd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr_fd.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putstr_fd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putstr_fd.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_striteri.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_striteri.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstadd_back.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstadd_back.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstadd_front.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstadd_front.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstpop_front.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_lstpop_front.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_print_memory.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_print_memory.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr_base.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr_base.o -------------------------------------------------------------------------------- /chall04/tests/tmp/tbailly-.txt: -------------------------------------------------------------------------------- 1 | Invalid map: wrong number of lines 2 | Invalid map: wrong number of lines 3 | Invalid map: wrong number of lines 4 | Invalid map: wrong number of lines 5 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr_base_fd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr_base_fd.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_valid_extention.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_valid_extention.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/gnl/get_next_line.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/gnl/get_next_line.o -------------------------------------------------------------------------------- /chall04/tests/test01_out.txt: -------------------------------------------------------------------------------- 1 | . 2 | . #.... 3 | #. ....... 4 | ......... 5 | ########## 6 | 7 | 8 | 9 | .......... 10 | ########## 11 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/parse.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/parse.o -------------------------------------------------------------------------------- /chall04/tests/test01_in.txt: -------------------------------------------------------------------------------- 1 | 10 2 | .......... 3 | #....... 4 | #...... 5 | 6 | ########## 7 | .......... 8 | 9 | 10 | 11 | ########## 12 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_dprintf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_dprintf.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_printf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_printf.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_sprintf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_sprintf.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_e.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_e.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_g.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_g.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/read_flags.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/read_flags.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_c.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_d.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_d.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_e.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_e.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_f.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_f.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_g.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_g.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_i.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_i.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_n.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_n.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_o.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_o.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_p.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_p.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_s.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_s.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_u.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_u.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/double_utils.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/double_utils.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_asprintf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_asprintf.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_strdup_cat.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/ft_strdup_cat.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_dec.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_dec.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_hex.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_hex.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_oct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_oct.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_ptr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_ptr.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/write_buffer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/write_buffer.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_mod.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_mod.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/double_utils_2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/double_utils_2.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_double.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/put/put_double.o -------------------------------------------------------------------------------- /chall01/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char *ft_rgb2hex(int r, int g, int b); 5 | 6 | int main() 7 | { 8 | printf("%s\n", ft_rgb2hex(255, 255, 255)); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/cast_len_modifier.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/cast_len_modifier.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/double_validation.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/double_validation.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_x_lowcase.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_x_lowcase.o -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_x_upcase.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/42paris/remote-challenges/HEAD/battlespace/rendus/jun2020/juligonz/lib/libft/ft_printf/srcs/convs/conv_x_upcase.o -------------------------------------------------------------------------------- /chall03/trace.txt: -------------------------------------------------------------------------------- 1 | ok : aguiot--, alesanto, asimoes, cdittric, charoua, eflorenz, esoulard, etieberg, fmerding, fmuller, fyusuf-a, juligonz, mlaraki, njaber, pbenoit, sganon 2 | 3 | pas ok : nkamolba, tterrail 4 | 5 | winer : fmuller -------------------------------------------------------------------------------- /chall04/tests/sand.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | print('\n'.join([''.join(i) for i in zip(*['#'.join([''.join(sorted(a)) for a in b.split('#')]) for b in [''.join(c) for c in zip(*[input() for i in range(int(input()))])]])])) 4 | 5 | -------------------------------------------------------------------------------- /chall02/morse.txt: -------------------------------------------------------------------------------- 1 | .- 2 | -... 3 | -.-. 4 | -.. 5 | . 6 | ..-. 7 | --. 8 | .... 9 | .. 10 | .--- 11 | -.- 12 | .-.. 13 | -- 14 | -. 15 | --- 16 | .--. 17 | --.- 18 | .-. 19 | ... 20 | - 21 | ..- 22 | ...- 23 | .-- 24 | -..- 25 | -.-- 26 | --.. -------------------------------------------------------------------------------- /chall01/esoulard.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char *ft_rgb2hex(int r, int g, int b) 5 | { 6 | char *buf; 7 | 8 | if (!(buf = malloc(15))) 9 | return (NULL); 10 | sprintf(buf, "#%02x%02x%02x", r, g, b); 11 | return (buf); 12 | } -------------------------------------------------------------------------------- /chall04/tests/expected.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/gmolin.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | ........ 7 | ..#.... 8 | # 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/hopham.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | ........ 7 | ..#.... 8 | # 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/ksappi.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/mdesta.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/sadawi.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/srouhe.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | ........ 7 | ..#....... 8 | #...... 9 | 10 | ########## 11 | .......... 12 | 13 | 14 | 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/vtran.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/alcohen.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/bleplat.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/cdittric.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/charoua.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/cyrlemai.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/dmukaliy.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | ........ 7 | ..#.... 8 | # 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/frdescam.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/fyusuf-a.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/hbaudet.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/jmartel.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/jnovotny.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/juligonz.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/lsarrazi.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/mlaraki.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/mtuomine.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/ptuukkan.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/tdawson.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /chall04/tests/tmp/vkuikka.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | . 7 | . #.... 8 | #. ....... 9 | ......... 10 | ########## 11 | 12 | 13 | 14 | .......... 15 | ########## 16 | 17 | 18 | . 19 | . 20 | -------------------------------------------------------------------------------- /battlespace/grids/jun2020/grid_an: -------------------------------------------------------------------------------- 1 | 0 . . . . . . . . . 2 | 0 0 0 0 . 2 . . . . 3 | 0 . . . . . 2 . . . 4 | . . . . . . . 2 . . 5 | . . . . 3 . . . . S 6 | . . . 3 . . . . . . 7 | . . 3 . . 1 . . . . 8 | M . . . 1 . 1 . . . 9 | . . . . . 1 . . . . 10 | . . 4 4 . . . . . . 11 | -------------------------------------------------------------------------------- /battlespace/grids/jun2020/grid_ax: -------------------------------------------------------------------------------- 1 | . . . . . . . 4 . . 2 | . . . . . 4 4 . . . 3 | . 0 . 0 . . . . . . 4 | . . 0 . . . . . . . 5 | . . 0 . . . . . . . 6 | . . 0 . M . 2 . . . 7 | . . . . S . . 2 . . 8 | . . 1 . . 3 . . 2 . 9 | . 1 . 1 . . 3 . . . 10 | . . 1 . . . . 3 . . 11 | -------------------------------------------------------------------------------- /battlespace/grids/jun2020/grid_mn: -------------------------------------------------------------------------------- 1 | . . . . . . S . . . 2 | . 4 . . . . . . . . 3 | . 4 . . 0 . . . . . 4 | . . . 0 0 0 . . . . 5 | . . . . 0 . . . 1 1 6 | . . 3 . . . . . 1 1 7 | 3 3 3 . . . . . . . 8 | . . . . . . . . . . 9 | . . . . . . . . . . 10 | . . . . 2 2 2 . . M 11 | -------------------------------------------------------------------------------- /battlespace/grids/jun2020/grid_mx: -------------------------------------------------------------------------------- 1 | 1 1 . . . . . . . . 2 | 1 1 . . . . . . . . 3 | . . S 3 3 3 . . . . 4 | . 0 . . . . . . . . 5 | 0 0 0 . . . . . . 2 6 | . 0 . . . . . . . 2 7 | . . . . . . . . . 2 8 | . . . . . . . . . . 9 | . . . . . . . . . . 10 | . . M . . . . 4 4 4 11 | -------------------------------------------------------------------------------- /battlespace/grids/jun2020/grid_nn: -------------------------------------------------------------------------------- 1 | . . . . . . . . . . 2 | . . . . . . . . . . 3 | . 4 . . . . 1 . . 0 4 | 4 4 . . . . 1 . . 0 5 | . . . . . . 1 . . 0 6 | . . M . . . 1 . . 0 7 | . . . . . . . . . 0 8 | 2 . . . . . . . . . 9 | 2 . 3 3 3 . . S . . 10 | 2 . . . . . . . . . 11 | -------------------------------------------------------------------------------- /battlespace/grids/jun2020/grid_nx: -------------------------------------------------------------------------------- 1 | . 1 . 2 2 2 . . . . 2 | . 1 . . . . . . . . 3 | . 1 . . . . . . . . 4 | . 1 . . . . . . 3 . 5 | . . . . . . . . 3 . 6 | . . . . . . . . 3 . 7 | M . . . 4 4 . . . . 8 | . . . . . . 4 S . . 9 | . . . . . . . . . . 10 | . . . . . 0 0 0 0 0 11 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/cclaude/map: -------------------------------------------------------------------------------- 1 | . . . . . . . . M . 2 | 3 3 . . . . . . . . 3 | 3 . . . . . . . . . 4 | 3 . . . . . . . . . 5 | . S . 2 . . . . . . 6 | . . . 2 . . . . 0 . 7 | 1 1 . 2 . . . 0 0 0 8 | 1 1 . . . . . . 0 . 9 | . . . . . . . . . . 10 | . . . 4 4 . . . . . 11 | -------------------------------------------------------------------------------- /chall01/jgroc-de.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char *ft_rgb2hex(int r, int g, int b) 5 | { 6 | char *out; 7 | 8 | out = malloc(sizeof(char) * 8); 9 | if (out) { 10 | sprintf(out, "#%02x%02x%02x", r, g, b); 11 | } 12 | 13 | return out; 14 | } -------------------------------------------------------------------------------- /chall04/tests/tmp/phakakos.txt: -------------------------------------------------------------------------------- 1 | . 2 | . # 3 | # 4 | . 5 | . .. 6 | 7 | . 8 | . #.... 9 | #. ....... 10 | ......... 11 | ########## 12 | 13 | 14 | 15 | .......... 16 | ########## 17 | 18 | 19 | 20 | . 21 | 22 | . 23 | 24 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/cclaude: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 45 7 | grids/jun2020/grid_ax 8 | 63 9 | grids/jun2020/grid_mn 10 | 61 11 | grids/jun2020/grid_mx 12 | 54 13 | grids/jun2020/grid_nn 14 | 48 15 | grids/jun2020/grid_nx 16 | 58 17 | total: 329 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/framel: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 95 7 | grids/jun2020/grid_ax 8 | 101 9 | grids/jun2020/grid_mn 10 | 97 11 | grids/jun2020/grid_mx 12 | 104 13 | grids/jun2020/grid_nn 14 | 92 15 | grids/jun2020/grid_nx 16 | 102 17 | total: 591 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/hben-yah: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 78 7 | grids/jun2020/grid_ax 8 | 82 9 | grids/jun2020/grid_mn 10 | 80 11 | grids/jun2020/grid_mx 12 | 70 13 | grids/jun2020/grid_nn 14 | 75 15 | grids/jun2020/grid_nx 16 | 68 17 | total: 453 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/kibotrel: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 80 7 | grids/jun2020/grid_ax 8 | 111 9 | grids/jun2020/grid_mn 10 | 73 11 | grids/jun2020/grid_mx 12 | 102 13 | grids/jun2020/grid_nn 14 | 85 15 | grids/jun2020/grid_nx 16 | 73 17 | total: 524 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/memartin: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 72 7 | grids/jun2020/grid_ax 8 | 74 9 | grids/jun2020/grid_mn 10 | 68 11 | grids/jun2020/grid_mx 12 | 65 13 | grids/jun2020/grid_nn 14 | 65 15 | grids/jun2020/grid_nx 16 | 53 17 | total: 397 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/asurrel: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 138 7 | grids/jun2020/grid_ax 8 | 157 9 | grids/jun2020/grid_mn 10 | 97 11 | grids/jun2020/grid_mx 12 | 112 13 | grids/jun2020/grid_nn 14 | 170 15 | grids/jun2020/grid_nx 16 | 177 17 | total: 851 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/cdittric: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 200 7 | grids/jun2020/grid_ax 8 | 200 9 | grids/jun2020/grid_mn 10 | 200 11 | grids/jun2020/grid_mx 12 | 200 13 | grids/jun2020/grid_nn 14 | 200 15 | grids/jun2020/grid_nx 16 | 200 17 | total: 1200 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/hbaudet: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 101 7 | grids/jun2020/grid_ax 8 | 110 9 | grids/jun2020/grid_mn 10 | 97 11 | grids/jun2020/grid_mx 12 | 107 13 | grids/jun2020/grid_nn 14 | 101 15 | grids/jun2020/grid_nx 16 | 112 17 | total: 628 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/mahaffne: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 138 7 | grids/jun2020/grid_ax 8 | 157 9 | grids/jun2020/grid_mn 10 | 97 11 | grids/jun2020/grid_mx 12 | 112 13 | grids/jun2020/grid_nn 14 | 170 15 | grids/jun2020/grid_nx 16 | 177 17 | total: 851 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/mchardin: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | KO 6 | grids/jun2020/grid_an 7 | 65 8 | grids/jun2020/grid_ax 9 | 64 10 | grids/jun2020/grid_mn 11 | 51 12 | grids/jun2020/grid_mx 13 | 56 14 | grids/jun2020/grid_nn 15 | 55 16 | grids/jun2020/grid_nx 17 | 54 18 | total: 345 19 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/roalvare: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | grids/jun2020/grid_an 6 | 101 7 | grids/jun2020/grid_ax 8 | 104 9 | grids/jun2020/grid_mn 10 | 97 11 | grids/jun2020/grid_mx 12 | 104 13 | grids/jun2020/grid_nn 14 | 101 15 | grids/jun2020/grid_nx 16 | 103 17 | total: 610 18 | -------------------------------------------------------------------------------- /battlespace/results/jun2020/juligonz: -------------------------------------------------------------------------------- 1 | Norm test: 2 | OK 3 | Makefile test: 4 | OK 5 | KO 6 | grids/jun2020/grid_an 7 | 101 8 | grids/jun2020/grid_ax 9 | 104 10 | grids/jun2020/grid_mn 11 | 97 12 | grids/jun2020/grid_mx 13 | 104 14 | grids/jun2020/grid_nn 15 | 101 16 | grids/jun2020/grid_nx 17 | 103 18 | total: 610 19 | -------------------------------------------------------------------------------- /chall04/tests/tmp/osalmine.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | . 4 | . # 5 | # 6 | . 7 | . .. 8 | 9 | 10 | . 11 | . #.... 12 | #. ....... 13 | ......... 14 | ########## 15 | 16 | 17 | 18 | .......... 19 | ########## 20 | 21 | 22 | 23 | 24 | . 25 | 26 | 27 | . 28 | -------------------------------------------------------------------------------- /chall04/tests/tmp/xtang.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | . 4 | . # 5 | # 6 | . 7 | . .. 8 | 9 | 10 | . 11 | . #.... 12 | #. ....... 13 | ......... 14 | ########## 15 | 16 | 17 | 18 | .......... 19 | ########## 20 | 21 | 22 | 23 | 24 | . 25 | 26 | 27 | . 28 | -------------------------------------------------------------------------------- /chall04/traces/etieberg.txt: -------------------------------------------------------------------------------- 1 | 1,19d0 2 | < . 3 | < . # 4 | < # 5 | < . 6 | < . .. 7 | < . 8 | < . #.... 9 | < #. ....... 10 | < ......... 11 | < ########## 12 | < 13 | < 14 | < 15 | < .......... 16 | < ########## 17 | < 18 | < 19 | < . 20 | < . 21 | Diff: KO 22 | -------------------------------------------------------------------------------- /chall04/traces/hthomas.txt: -------------------------------------------------------------------------------- 1 | 1,19d0 2 | < . 3 | < . # 4 | < # 5 | < . 6 | < . .. 7 | < . 8 | < . #.... 9 | < #. ....... 10 | < ......... 11 | < ########## 12 | < 13 | < 14 | < 15 | < .......... 16 | < ########## 17 | < 18 | < 19 | < . 20 | < . 21 | Diff: KO 22 | -------------------------------------------------------------------------------- /chall04/etieberg.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | p, q = zip(*[raw_input() for i in range(input())]), [] 4 | for i in range(len(p)): 5 | h = p[i].index('#') if '#' in p[i] else len(p) 6 | s = p[i][:h].count('.') 7 | q.append([' ' for sp in range(h-s)]+['.' for dt in range(s)]+list(p[i][h:])) 8 | for z in zip(*q): print(''.join(z)) 9 | -------------------------------------------------------------------------------- /chall00/emartine.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int ft_necklace(char *s1, char *s2) 6 | { 7 | size_t len = strlen(s1); 8 | if (len != strlen(s2)) 9 | return 0; 10 | char *buf = malloc(len * 2 + 1); 11 | strcpy(buf, s1); 12 | strcpy(buf + len, s1); 13 | return !!strstr(buf, s2); 14 | } 15 | -------------------------------------------------------------------------------- /chall04/tests/tmp/ltouret.txt: -------------------------------------------------------------------------------- 1 | gimme map size 2 | . 3 | . # 4 | # 5 | . 6 | . .. 7 | gimme map size 8 | . 9 | . #.... 10 | #. ....... 11 | ......... 12 | ########## 13 | 14 | 15 | 16 | .......... 17 | ########## 18 | gimme map size 19 | 20 | 21 | . 22 | gimme map size 23 | . 24 | -------------------------------------------------------------------------------- /chall04/tests/tmp/rjaakonm.txt: -------------------------------------------------------------------------------- 1 | . 2 | 3 | . # 4 | 5 | # 6 | 7 | . 8 | 9 | . .. 10 | 11 | ........ 12 | 13 | ..#.... 14 | 15 | # 16 | 17 | ......... 18 | 19 | ########## 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | .......... 28 | 29 | ########## 30 | 31 | 32 | 33 | 34 | 35 | . 36 | 37 | . 38 | 39 | -------------------------------------------------------------------------------- /chall04/tests/tmp/spentti.txt: -------------------------------------------------------------------------------- 1 | input: 2 | 3 | output: 4 | . 5 | . # 6 | # 7 | . 8 | . .. 9 | input: 10 | 11 | output: 12 | . 13 | . #.... 14 | #. ....... 15 | ......... 16 | ########## 17 | 18 | 19 | 20 | .......... 21 | ########## 22 | input: 23 | 24 | output: 25 | 26 | 27 | . 28 | input: 29 | 30 | output: 31 | . 32 | -------------------------------------------------------------------------------- /chall01/ibouchla.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | const char *s = "0123456789abcdef"; 6 | char *hex = (char *)malloc(8); 7 | 8 | hex[0] = '#'; 9 | hex[1] = s[r / 16]; 10 | hex[2] = s[r % 16]; 11 | hex[3] = s[g / 16]; 12 | hex[4] = s[g % 16]; 13 | hex[5] = s[b / 16]; 14 | hex[6] = s[b % 16]; 15 | hex[7] = '\0'; 16 | return (hex); 17 | } 18 | -------------------------------------------------------------------------------- /chall00/mchardin.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int ft_necklace(char *s1, char *s2) 4 | { 5 | int i = 1; 6 | int len = (int)strlen(s1); 7 | 8 | if (len != (int)strlen(s2)) 9 | return (0); 10 | else if (len == 0 || !strcmp(s1, s2)) 11 | return (1); 12 | while (i < len) 13 | { 14 | if (!strncmp(s1, &s2[len - i], i) 15 | && !strncmp(&s1[i], s2, len - i)) 16 | return (1); 17 | i++; 18 | } 19 | return (0); 20 | } 21 | -------------------------------------------------------------------------------- /chall04/tests/sand2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | n = int(input()) 4 | grid = [list(input()) for _ in range(n)] 5 | 6 | for col in range(n): 7 | nxt = n-1 8 | for row in reversed(range(n)): 9 | if grid[row][col] == ".": 10 | grid[row][col], grid[nxt][col] = " ", "." 11 | nxt -= 1 12 | elif grid[row][col] == "#": 13 | nxt = row-1 14 | 15 | for row in grid: 16 | print("".join(row)) 17 | -------------------------------------------------------------------------------- /chall01/charoua.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | char *str; 6 | char *hex; 7 | 8 | hex = "0123456789abcdef"; 9 | if (!(str = malloc(sizeof(char) * 8))) 10 | return (NULL); 11 | str[0] = '#'; 12 | str[1] = hex[r / 16]; 13 | str[2] = hex[r % 16]; 14 | str[3] = hex[g / 16]; 15 | str[4] = hex[g % 16]; 16 | str[5] = hex[b / 16]; 17 | str[6] = hex[b % 16]; 18 | str[7] = '\0'; 19 | return (str); 20 | } 21 | -------------------------------------------------------------------------------- /chall00/fratajcz.c: -------------------------------------------------------------------------------- 1 | int ft_necklace(char *s1, char *s2) 2 | { 3 | int i = 0; 4 | int k; 5 | int j; 6 | if (!*s1 && !*s2) 7 | return (1); 8 | if ((*s1 && !*s2) || (!*s1 && *s2)) 9 | return (0); 10 | while (s1[i]) 11 | { 12 | j = i; 13 | k = 0; 14 | while (s1[j] == s2[k] && s2[k]) 15 | { 16 | k++; 17 | j++; 18 | if (s1[j] == 0) 19 | j = 0; 20 | } 21 | if (s2[k] == 0) 22 | return (1); 23 | i++; 24 | } 25 | return (0); 26 | } 27 | -------------------------------------------------------------------------------- /chall01/etieberg.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | char *ft_rgb2hex(int r, int g, int b) 6 | { 7 | unsigned long rgb; 8 | char *str; 9 | 10 | if ((r < 0 || r > 255) || (g < 0 || g > 255) || (b < 0 || b > 255)) 11 | return (NULL); 12 | if (!(str = (char*)malloc(sizeof(char) * 8))) 13 | return (NULL); 14 | rgb = ((r & 0xff) << 16) + ((g & 0xff) << 8) + (b & 0xff); 15 | sprintf(str,"#%06lx", rgb); 16 | return (str); 17 | } 18 | -------------------------------------------------------------------------------- /chall00/nkhaldi.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int ft_nakelace(char *s1, char *s2) 4 | { 5 | int ret = 0; 6 | int i = 0; 7 | int j = 0; 8 | 9 | if (strlen(s1) != strlen(s2)) 10 | return ret; 11 | if (!strcmp(s1, "") && !strcmp(s2, "")) 12 | return (ret = 1); 13 | while (i < strlen(s1)) 14 | { 15 | if (s1 && (s1[i] == s2[j])) 16 | { 17 | j++; 18 | ret = 1; 19 | } 20 | else 21 | { 22 | ret = 0; 23 | } 24 | i++; 25 | } 26 | 27 | return (ret); 28 | } 29 | -------------------------------------------------------------------------------- /chall04/lsarrazi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from sys import stdin 4 | 5 | N = int(stdin.readline()) 6 | 7 | lines = [] 8 | for line in stdin: 9 | lines.append(list(line)[0:N]) 10 | 11 | for i in range(N - 1, -1, -1): 12 | for j in range(0, N): 13 | if lines[i][j] == '.': 14 | k = i 15 | while k < N - 1 and lines[k + 1][j] == ' ': 16 | k += 1 17 | lines[i][j] = ' ' 18 | lines[k][j] = '.' 19 | 20 | for line in lines: 21 | print(''.join(line)) 22 | 23 | -------------------------------------------------------------------------------- /chall00/gel-kasr.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int ft_necklace(char *s1, char *s2) 5 | { 6 | size_t i; 7 | size_t len; 8 | size_t n; 9 | 10 | if (!s1 || !s2) 11 | return (!s1 && !s2); 12 | len = strlen(s1); 13 | if (len != strlen(s2)) 14 | return (0); 15 | if (!len) 16 | return (1); 17 | i = 0; 18 | while (s1[i]) 19 | { 20 | n = 0; 21 | while (s1[(i + n) % len] == s2[n]) 22 | n++; 23 | if (n == len) 24 | return (1); 25 | i++; 26 | } 27 | return (0); 28 | } 29 | -------------------------------------------------------------------------------- /chall01/ele-goug.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | 6 | char *ft_rgb2hex( int r, int g, int b ) 7 | { 8 | char *s; 9 | 10 | if ( !( s = malloc( 8 ) ) ) 11 | return NULL; 12 | 13 | sprintf( s, "#%02hhx%02hhx%02hhx", ( uint8_t ) r, ( uint8_t ) g, ( uint8_t ) b ); 14 | return s; 15 | } 16 | 17 | /*void main( int ac, char **av ) 18 | { 19 | if ( ac < 4 ) 20 | return; 21 | 22 | puts( ft_rgb2hex( atoi( av[1] ), atoi( av[2] ), atoi( av[3] ) ) ); 23 | }*/ 24 | -------------------------------------------------------------------------------- /chall04/traces/tbailly-.txt: -------------------------------------------------------------------------------- 1 | 1,19c1,4 2 | < . 3 | < . # 4 | < # 5 | < . 6 | < . .. 7 | < . 8 | < . #.... 9 | < #. ....... 10 | < ......... 11 | < ########## 12 | < 13 | < 14 | < 15 | < .......... 16 | < ########## 17 | < 18 | < 19 | < . 20 | < . 21 | --- 22 | > Invalid map: wrong number of lines 23 | > Invalid map: wrong number of lines 24 | > Invalid map: wrong number of lines 25 | > Invalid map: wrong number of lines 26 | Diff: KO 27 | -------------------------------------------------------------------------------- /chall01/cdittric.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | const char *hex = "0123456789abcdef"; 6 | char *ret; 7 | 8 | ret = malloc(sizeof(char) * 8); 9 | if (ret == NULL) 10 | return (NULL); 11 | ret[0] = '#'; 12 | ret[1] = hex[r / 16]; 13 | ret[2] = hex[r % 16]; 14 | ret[3] = hex[g / 16]; 15 | ret[4] = hex[g % 16]; 16 | ret[5] = hex[b / 16]; 17 | ret[6] = hex[b % 16]; 18 | ret[7] = '\0'; 19 | return (ret); 20 | } 21 | -------------------------------------------------------------------------------- /chall01/hben-yah.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | char *res; 6 | int rgb; 7 | int i; 8 | char *base = "0123456789abcedf"; 9 | 10 | if (r < 0 || r > 255 11 | || g < 0 || g > 255 12 | || b < 0 || b > 255 13 | || !(res = (char *)malloc(sizeof(char) * 8))) 14 | return (NULL); 15 | rgb = r << 16 | g << 8 | b; 16 | res[0] = '#'; 17 | res[7] = 0; 18 | i = 7; 19 | while (--i) 20 | { 21 | res[i] = base[rgb & 0xf]; 22 | rgb >>= 4; 23 | } 24 | return (res); 25 | } 26 | -------------------------------------------------------------------------------- /chall01/mbourand.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | char *base = "0123456789abcdef"; 6 | 7 | char *hex; 8 | if (!(hex = malloc(sizeof(char) * 8)) || r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) 9 | return (0); 10 | 11 | hex[0] = '#'; 12 | hex[1] = base[r / 16]; 13 | hex[2] = base[r % 16]; 14 | hex[3] = base[g / 16]; 15 | hex[4] = base[g % 16]; 16 | hex[5] = base[b / 16]; 17 | hex[6] = base[b % 16]; 18 | hex[7] = 0; 19 | 20 | return hex; 21 | } -------------------------------------------------------------------------------- /battlespace/results/jun2020/GLOBAL: -------------------------------------------------------------------------------- 1 | results/jun2020/cclaude 2 | total: 329 3 | results/jun2020/mchardin 4 | total: 345 5 | results/jun2020/memartin 6 | total: 397 7 | results/jun2020/hben-yah 8 | total: 453 9 | results/jun2020/kibotrel 10 | total: 524 11 | results/jun2020/framel 12 | total: 591 13 | results/jun2020/roalvare 14 | total: 610 15 | results/jun2020/juligonz 16 | total: 610 17 | results/jun2020/hbaudet 18 | total: 628 19 | results/jun2020/mahaffne 20 | total: 851 21 | results/jun2020/asurrel 22 | total: 851 23 | results/jun2020/cdittric 24 | total: 1200 25 | -------------------------------------------------------------------------------- /chall04/tests/tmp/mlindhol.txt: -------------------------------------------------------------------------------- 1 | 2 | :::START POSITION::: 3 | 4 | N = 5 5 | ..... 6 | # 7 | # 8 | 9 | . 10 | -------------------- 11 | 12 | :::START POSITION::: 13 | 14 | N = 10 15 | .......... 16 | #....... 17 | #...... 18 | 19 | ########## 20 | .......... 21 | 22 | 23 | 24 | ########## 25 | -------------------- 26 | 27 | :::START POSITION::: 28 | 29 | N = 3 30 | 31 | 32 | . 33 | -------------------- 34 | 35 | :::START POSITION::: 36 | 37 | N = 1 38 | . 39 | -------------------- 40 | -------------------------------------------------------------------------------- /chall01/roalvare.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void byte_to_hexa(char *dst, unsigned char byte) 4 | { 5 | static char *HEXA_BASE="0123456789abcdef"; 6 | 7 | dst[0] = HEXA_BASE[byte >> 4]; 8 | dst[1] = HEXA_BASE[byte % 16]; 9 | } 10 | 11 | char *ft_rgb2hex(int r, int g, int b) 12 | { 13 | unsigned char red = r, green = g, blue = b; 14 | char *hex = NULL; 15 | 16 | if (!(hex = calloc(1, 8))) 17 | return (NULL); 18 | hex[0] = '#'; 19 | byte_to_hexa(&hex[1], red); 20 | byte_to_hexa(&hex[3], green); 21 | byte_to_hexa(&hex[5], blue); 22 | return (hex); 23 | } -------------------------------------------------------------------------------- /chall01/askobins.c: -------------------------------------------------------------------------------- 1 | char h2c(unsigned char a) 2 | { 3 | return (a > 10 ? a + 87 : a + 48); 4 | } 5 | 6 | char *ft_rgb2hex(int r, int g, int b) 7 | { 8 | char result[8]; 9 | char *send; 10 | 11 | result[0] = '#'; 12 | result[1] = h2c(((unsigned char)r & 0xf0) >> 4); 13 | result[2] = h2c((unsigned char)r & 0x0f); 14 | result[3] = h2c(((unsigned char)g & 0xf0) >> 4); 15 | result[4] = h2c((unsigned char)g & 0x0f); 16 | result[5] = h2c(((unsigned char)b & 0xf0) >> 4); 17 | result[6] = h2c((unsigned char)b & 0x0f); 18 | result[7] = '\0'; 19 | send = result; 20 | return (send); 21 | } 22 | -------------------------------------------------------------------------------- /chall00/kibotrel.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int ft_necklace(char *s1, char *s2) 4 | { 5 | int i; 6 | int size; 7 | int offset; 8 | char *substr; 9 | 10 | if (s1 == s2 || !strcmp(s1, s2)) 11 | return (1); 12 | size = strlen(s1); 13 | if (size != strlen(s2) || !(substr = strchr(s2, s1[0]))) 14 | return (0); 15 | while (i = -1, substr) 16 | { 17 | offset = substr - s2; 18 | while (++i < size) 19 | if (s1[i] != s2[(i + offset) % size]) 20 | break; 21 | if (i == size) 22 | return (1); 23 | substr = strchr(substr + 1, s1[0]); 24 | } 25 | return (0); 26 | } 27 | -------------------------------------------------------------------------------- /chall00/jergauth.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void ft_shift(char *str) 4 | { 5 | char head; 6 | size_t i; 7 | 8 | head = str[0]; 9 | i = 1; 10 | while (str[i]) 11 | { 12 | str[i - 1] = str[i]; 13 | i++; 14 | } 15 | str[i - 1] = head; 16 | } 17 | 18 | int ft_necklace(char *s1, char *s2) 19 | { 20 | size_t len; 21 | 22 | len = strlen(s1); 23 | if (len != strlen(s2)) 24 | return 0; 25 | while (len--) 26 | { 27 | if (strcmp(s1, s2) == 0) 28 | return 1; 29 | ft_shift(s2); 30 | } 31 | return strcmp(s1, s2) == 0; 32 | } 33 | -------------------------------------------------------------------------------- /chall00/mle-moni.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void slide_pearl(char *str) 4 | { 5 | char tmp; 6 | int i; 7 | 8 | i = 0; 9 | tmp = str[0]; 10 | while (str[i] && str[i + 1]) 11 | { 12 | str[i] = str[i + 1]; 13 | i++; 14 | } 15 | str[i] = tmp; 16 | } 17 | 18 | int ft_necklace(char *s1, char *s2) 19 | { 20 | int i; 21 | int diff; 22 | 23 | i = 0; 24 | if (strlen(s1) != strlen(s2)) 25 | return (0); 26 | if (!s1[0] && !s2[0]) 27 | return (1); 28 | while (s1[i]) 29 | { 30 | slide_pearl(s2); 31 | diff = strcmp(s1, s2); 32 | if (diff == 0) 33 | return (1); 34 | i++; 35 | } 36 | return (0); 37 | } 38 | -------------------------------------------------------------------------------- /chall00/takiapo.c: -------------------------------------------------------------------------------- 1 | #include 2 | int ft_necklace(char *s1, char *s2){ 3 | 4 | int i; 5 | char al1[512]; 6 | char al2[512]; 7 | 8 | if (!s1 && !s2 || !*s1 && !*s2) 9 | return 1; 10 | if (!s1 || !s2){ 11 | return 0; 12 | } 13 | i = 0; 14 | while (i < 512) 15 | { 16 | al1[i] = 0; 17 | al2[i] = 0; 18 | i++; 19 | } 20 | i = 0; 21 | while (s1[i] && s2[i]){ 22 | al1[s1[i]] += 1; 23 | al2[s2[i]] += 1; 24 | i++; 25 | } 26 | if (s1[i] || s2[i]) 27 | return 0; 28 | i = 0; 29 | while (i < 512) 30 | { 31 | if (al1[i] != al2[i]){ 32 | return 0; 33 | } 34 | i++; 35 | } 36 | return 1; 37 | } 38 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/cclaude/Makefile: -------------------------------------------------------------------------------- 1 | NAME = btsp 2 | 3 | CC = clang-9 4 | 5 | CFLAGS = -Wall -Wextra -Werror 6 | 7 | HEADER = btsp.h 8 | 9 | SRC = btsp.c check.c coeff.c map.c shield.c sink.c sunk.c tools.c 10 | 11 | OBJ = $(SRC:.c=.o) 12 | 13 | all: $(NAME) 14 | 15 | $(NAME): $(OBJ) 16 | @echo "\n\033[0;33mCompiling..." 17 | $(CC) -o $(NAME) $(OBJ) 18 | @echo "\033[0m" 19 | 20 | %.o: %.c 21 | @echo "\033[0;32mGenerating obj..." 22 | $(CC) -c $< $(CFLAGS) 23 | @echo "\033[0m" 24 | 25 | clean: 26 | rm -f $(OBJ) 27 | 28 | fclean: clean 29 | rm -f $(NAME) 30 | 31 | re: fclean all 32 | 33 | .PHONY: all re clean fclean 34 | -------------------------------------------------------------------------------- /chall00/etieberg.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int ft_necklace(char *s1, char *s2) 6 | { 7 | unsigned long i; 8 | char *dest; 9 | 10 | if (!(dest = (char*)malloc(sizeof(char) * strlen(s1)+1))) 11 | exit(0); 12 | if (!strcmp(s1, "") && !strcmp(s2, "")) 13 | return (1); 14 | if (strlen(s1) != strlen(s2)) 15 | return (0); 16 | i = -1; 17 | memcpy(dest, s1, strlen(s1)+1); 18 | while (++i < strlen(s1)) 19 | { 20 | strncat(dest, &s1[i], 1); 21 | if (!strcmp(dest+i+1, s2)) 22 | { 23 | free(dest); 24 | return (1); 25 | } 26 | } 27 | free(dest); 28 | return (0); 29 | } 30 | -------------------------------------------------------------------------------- /chall01/kchadir.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char *ft_rgb2hex(int r, int g, int b) 5 | { 6 | char *res; 7 | char *dicohex; 8 | 9 | dicohex = "0123456789abcdef"; 10 | if (!(res = (char *)malloc(sizeof(char) * 8))) 11 | return NULL; 12 | res[0] = '#'; 13 | res[1] = dicohex[r / 16]; 14 | res[2] = dicohex[r % 16]; 15 | res[3] = dicohex[g / 16]; 16 | res[4] = dicohex[g % 16]; 17 | res[5] = dicohex[b / 16]; 18 | res[6] = dicohex[b % 16]; 19 | res[7] = '\0'; 20 | 21 | return (res); 22 | } 23 | -------------------------------------------------------------------------------- /chall02/aguiot--.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | 4 | dict = {' ': ' ', 'a': '.-', 'b': '-...', 'c': '-.-.', 'd': '-..', 'e': '.', 'f': '..-. ', 'g': '--.', 'h': '....', 'i': '..', 'j': '.---', 'k': '-.-', 'l': '.-..', 'm': '--', 'n': '-.', 'o': '---', 'p': '.--.', 'q': '--.-', 'r': '.-.', 's': '...', 't': '-', 'u': '..-', 'v': '...-', 'w': '.--','x': '-..-', 'y': '-.--', 'z': '--..'} 5 | 6 | if (len(sys.argv) != 2) or len(sys.argv[1]) < 1 or not (sys.argv[1].replace(' ','') + 'a').isalpha(): 7 | print("usage: ./aguiot--.py ") 8 | sys.exit(0) 9 | 10 | print(''.join(dict[char] for char in sys.argv[1].lower())) 11 | -------------------------------------------------------------------------------- /chall01/dgalanop.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | char *hex; 6 | int len; 7 | int nb; 8 | int i; 9 | 10 | if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) 11 | return (NULL); 12 | len = 7; 13 | if (!(hex = (char*)malloc(sizeof(char) * len + 1))) 14 | return (NULL); 15 | hex[len] = '\0'; 16 | len--; 17 | nb = b; 18 | while (len > 0) 19 | { 20 | i = -1; 21 | while (++i < 2 && len > 0) 22 | { 23 | hex[len] = "0123456789abcdef"[nb % 16]; 24 | nb = nb / 16; 25 | len--; 26 | } 27 | nb = (len == 4) ? g : r; 28 | } 29 | hex[len] = '#'; 30 | return (hex); 31 | } 32 | -------------------------------------------------------------------------------- /chall01/nforay.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static int invalid_rgb(int col) 4 | { 5 | if (col < 0 || col > 255) 6 | return (1); 7 | return (0); 8 | } 9 | 10 | char *ft_rgb2hex(int r, int g, int b) 11 | { 12 | char *str; 13 | const char *hex = "0123456789abcdef"; 14 | 15 | if (invalid_rgb(r) || invalid_rgb(g) || invalid_rgb(b)) 16 | return (NULL); 17 | if (!(str = malloc(sizeof(char) * 8))) 18 | return (NULL); 19 | str[0] = '#'; 20 | str[1] = hex[r / 16]; 21 | str[2] = hex[r % 16]; 22 | str[3] = hex[g / 16]; 23 | str[4] = hex[g % 16]; 24 | str[5] = hex[b / 16]; 25 | str[6] = hex[b % 16]; 26 | str[7] = '\0'; 27 | return (str); 28 | } -------------------------------------------------------------------------------- /chall01/cclaude.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | int i; 6 | int n; 7 | char *hex; 8 | char *base = "0123456789abcdef"; 9 | 10 | // Check for errors 11 | if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) 12 | return (NULL); 13 | 14 | // Allocate 8 chars 15 | if (!(hex = calloc(8, sizeof(char)))) 16 | return (NULL); 17 | 18 | // Fill in start and end 19 | hex[0] = '#'; 20 | hex[7] = '\0'; 21 | 22 | // Fill in colors 23 | n = 256 * 256 * r + 256 * g + b; 24 | for (i = 6 ; i > 0 ; i--) 25 | { 26 | hex[i] = base[n % 16]; 27 | n /= 16; 28 | } 29 | 30 | return (hex); 31 | } 32 | -------------------------------------------------------------------------------- /chall01/dtheo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define HEX_STRING "0123456789abcdef" 3 | 4 | static void fill_hex(int val, char *hex, int off) 5 | { 6 | hex[off] = HEX_STRING[val / 16]; 7 | hex[off + 1] = HEX_STRING[val % 16]; 8 | } 9 | 10 | char *ft_rgb2hex(int r, int g, int b) 11 | { 12 | char *hex; 13 | 14 | if (r < 0 || g < 0 || b < 0) 15 | return (NULL); 16 | if (!(hex = (char *)malloc(sizeof(char) * 8))) 17 | return (NULL); 18 | hex[0] = '#'; 19 | hex[7] = 0; 20 | 21 | fill_hex(r % 256, hex, 1); 22 | fill_hex(g % 256, hex, 3); 23 | fill_hex(b % 256, hex, 5); 24 | 25 | return (hex); 26 | } -------------------------------------------------------------------------------- /chall01/varnaud.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | char *hex; 6 | 7 | r %= 256; 8 | g %= 256; 9 | b %= 256; 10 | hex = (char*)malloc(sizeof(char) * 8); 11 | if (hex == NULL) 12 | return (NULL); 13 | hex[0] = '#'; 14 | hex[1] = r / 16 > 9 ? r / 16 + 'a' - 10 : r / 16 + '0'; 15 | hex[2] = r % 16 > 9 ? r % 16 + 'a' - 10 : r % 16 + '0'; 16 | hex[3] = g / 16 > 9 ? g / 16 + 'a' - 10 : g / 16 + '0'; 17 | hex[4] = g % 16 > 9 ? g % 16 + 'a' - 10 : g % 16 + '0'; 18 | hex[5] = b / 16 > 9 ? b / 16 + 'a' - 10 : b / 16 + '0'; 19 | hex[6] = b % 16 > 9 ? b % 16 + 'a' - 10 : b % 16 + '0'; 20 | hex[7] = '\0'; 21 | return (hex); 22 | } 23 | -------------------------------------------------------------------------------- /chall01/mlaraki.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | char *result; 6 | char *base = "0123456789abcdef"; 7 | 8 | if ((r < 0 || r > 255) || (g < 0 || g > 255) || (b < 0 || b > 255)) 9 | return ("Error : invalid input"); 10 | if(!(result = (char*)malloc(8 * sizeof(char)))) 11 | return ("Error: memory allocation failed"); 12 | 13 | result[0] = '#'; 14 | result[1] = base[r / 16]; 15 | result[2] = base[r % 16]; 16 | result[3] = base[g / 16]; 17 | result[4] = base[g % 16]; 18 | result[5] = base[b / 16]; 19 | result[6] = base[b % 16]; 20 | result[7] = '\0'; 21 | 22 | return (result); 23 | } 24 | -------------------------------------------------------------------------------- /chall01/nclabaux.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char ft_dec2hex(int i) 5 | { 6 | if (i > 9) 7 | return (i + 87); 8 | return (i + 48); 9 | } 10 | 11 | char *ft_rgb2hex(int r, int g, int b) 12 | { 13 | char *result; 14 | 15 | if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) 16 | return (NULL); 17 | if(!(result = malloc(sizeof(char) * 8))) 18 | return (NULL); 19 | result[0] = '#'; 20 | result[1] = ft_dec2hex(r / 16); 21 | result[2] = ft_dec2hex(r % 16); 22 | result[3] = ft_dec2hex(g / 16); 23 | result[4] = ft_dec2hex(g % 16); 24 | result[5] = ft_dec2hex(b / 16); 25 | result[6] = ft_dec2hex(b % 16); 26 | result[7] = 0; 27 | return (result); 28 | } -------------------------------------------------------------------------------- /chall01/alesanto.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ft_rgb2hex(int r, int g, int b) 4 | { 5 | char *hex; 6 | char color; 7 | char *base = "0123456789abcdef"; 8 | 9 | if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) 10 | return (NULL); 11 | if (!(hex = calloc(8, sizeof(char)))) 12 | return (NULL); 13 | hex[0] = '#'; 14 | //red 15 | color = base[r / 16]; 16 | hex[1] = color; 17 | color = base[r % 16]; 18 | hex[2] = color; 19 | //green 20 | color = base[g / 16]; 21 | hex[3] = color; 22 | color = base[g % 16]; 23 | hex[4] = color; 24 | //blue 25 | color = base[b / 16]; 26 | hex[5] = color; 27 | color = base[b % 16]; 28 | hex[6] = color; 29 | return (hex); 30 | } 31 | -------------------------------------------------------------------------------- /chall01/qlouisia.c: -------------------------------------------------------------------------------- 1 | 2 | char *ft_rgb2hex(int r, int g, int b) 3 | { 4 | char *ret; 5 | char *val ="0123456789abcdef"; 6 | int current; 7 | if ((r < 0) || (r > 255) || (g < 0) || (g > 255) || (b < 0) || (b > 255)) 8 | return (NULL); 9 | if (!(ret = (char *)malloc(sizeof(char) * 7))) 10 | return (NULL); 11 | ret[0] = '#'; 12 | int i = 1; 13 | while (i < 7) 14 | { 15 | if (i < 3) 16 | current = r; 17 | else if (i >= 3 && i < 5) 18 | current = g; 19 | else if (i >= 5) 20 | current = b; 21 | 22 | ret[i] = val[(current / 16)]; 23 | i++; 24 | ret[i] = val[(current % 16)]; 25 | i++; 26 | } 27 | return (ret); 28 | } 29 | -------------------------------------------------------------------------------- /chall00/roalvare.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int ft_necklace(char *s1, char *s2) 6 | { 7 | int len_s1 = strlen(s1); 8 | int len_s2 = strlen(s2); 9 | char *cursor = s2; 10 | 11 | if (s1 == NULL || s2 == NULL) 12 | return (0); 13 | if (len_s1 != len_s2) 14 | return (0); 15 | char *cmp = NULL; 16 | if (!(cmp = calloc(1, len_s1))) 17 | return(0); 18 | while ((cursor = strchr(cursor, s1[0]))) 19 | { 20 | strcpy(cmp, cursor); 21 | strncpy(cmp + strlen(cursor), s2, len_s2 - strlen(cursor)); 22 | if (!strcmp(s1, cmp)) 23 | { 24 | free(cmp); 25 | return(1); 26 | } 27 | cursor++; 28 | } 29 | free(cmp); 30 | return (0); 31 | } 32 | -------------------------------------------------------------------------------- /chall00/jgiron.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int ft_necklace(char *s1, char *s2) 6 | { 7 | char *longstr1; 8 | int i; 9 | 10 | if (!s1 || !s2) 11 | return (0); 12 | if (strlen(s1) != strlen(s2)) 13 | return (0); 14 | if (!*s1 && !*s2) 15 | return (1); 16 | longstr1 = malloc(strlen(s1) + strlen(s1) + 1); 17 | strcpy(longstr1, s1); 18 | strcat(longstr1, s1); 19 | i = -1; 20 | while (++i < strlen(s1)) 21 | if (!strncmp(longstr1 + i, s2, strlen(s1))) 22 | { 23 | free(longstr1); 24 | return (1); 25 | } 26 | free(longstr1); 27 | return (0); 28 | } 29 | -------------------------------------------------------------------------------- /chall01/eparisot.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void int2hex(int n, char *hex) 4 | { 5 | char *nbs = "0123456789abcdef"; 6 | char *res; 7 | int i; 8 | 9 | i = 0; 10 | while (n > 15) 11 | { 12 | n -= 16; 13 | i++; 14 | } 15 | hex[0] = nbs[i]; 16 | i = 0; 17 | while (n > 0) 18 | { 19 | n -= 1; 20 | i++; 21 | } 22 | hex[1] = nbs[i]; 23 | } 24 | 25 | char *ft_rgb2hex(int r, int g, int b) 26 | { 27 | char *hex; 28 | 29 | if (r >= 0 && g >= 0 && b >= 0) 30 | { 31 | if ((hex = (char *)malloc(8)) == NULL) 32 | return(NULL); 33 | hex[0] = '#'; 34 | int2hex(r, hex+1); 35 | int2hex(g, hex+3); 36 | int2hex(b, hex+5); 37 | hex[7] = '\0'; 38 | return(hex); 39 | } 40 | return(NULL); 41 | } 42 | -------------------------------------------------------------------------------- /chall01/ymarcill.py: -------------------------------------------------------------------------------- 1 | import sys, getopt 2 | 3 | def mymorse(argv): 4 | listem = [".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--.."]; 5 | usage = "usage: ./ymarcill.py " 6 | if len(argv) != 1 or argv[0].isalpha() is False: 7 | print(usage); 8 | return; 9 | for letter in argv[0] : 10 | if letter.isupper() : 11 | sys.stdout.write(listem[ord(letter) - 65]); 12 | elif letter.islower(): 13 | sys.stdout.write(listem[ord(letter) - 97]); 14 | print(""); 15 | 16 | if __name__ == '__main__': 17 | mymorse(sys.argv[:0:-1]) 18 | -------------------------------------------------------------------------------- /chall00/ibouchla.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void ccpy(char *buffer, size_t len) 5 | { 6 | char c = buffer[0]; 7 | for (size_t i = 0; i < len; i++) 8 | buffer[i] = buffer[i + 1]; 9 | buffer[len] = c; 10 | buffer[len + 1] = '\0'; 11 | } 12 | 13 | int ft_necklace(char *s1, char *s2) 14 | { 15 | size_t len = strlen((const char *)s1); 16 | size_t len_s2 = strlen((const char *)s2); 17 | char *buffer = (char *)malloc(len + 1); 18 | 19 | buffer = strcpy(buffer, (char *)s1); 20 | if (len == 0 && len_s2 == 0) 21 | return (1); 22 | for (size_t i = 0; i < len; i++) 23 | { 24 | ccpy(buffer, len - 1); 25 | if ((strcmp((const char *)buffer, (const char *)s2)) == 0) 26 | return (1); 27 | } 28 | return (0); 29 | } 30 | -------------------------------------------------------------------------------- /chall02/solution.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import string 4 | import sys 5 | 6 | raw_codes = ".- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. -- -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --.." 7 | code_map = {k: v for k, v in zip(string.ascii_lowercase, raw_codes.split(" "))} 8 | 9 | def smorse(input_str): 10 | return "".join(code_map[c] for c in input_str) 11 | 12 | 13 | if len(sys.argv) != 3: 14 | print(f"usage: ./{sys.argv[1]}.py ") 15 | exit(1) 16 | 17 | 18 | for av in sys.argv[2].split(" "): 19 | if not av.isalpha(): 20 | print(f"usage: ./{sys.argv[1]}.py ") 21 | exit(1) 22 | 23 | lowercase = sys.argv[2].lower() 24 | print(" ".join(smorse(av) for av in lowercase.split(" "))) 25 | -------------------------------------------------------------------------------- /chall04/tests/auto-eval.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | mkdir -p tmp 4 | mkdir -p ../traces 5 | 6 | ok=() 7 | not_ok=() 8 | 9 | for i in ../*.py; do 10 | for j in *_in.txt; do 11 | #test number 12 | testnum=${j:s/_in.txt/} 13 | 14 | # login 15 | login=${i:s/.py/} 16 | login=${login:s/..\//} 17 | 18 | echo ${login}: 19 | cat $j | $i >> tmp/${login}.txt 20 | done 21 | diff expected.txt tmp/${login}.txt > ../traces/${login}.txt 22 | if [[ $? -eq 0 ]]; then 23 | echo "Diff: OK" >> ../traces/${login}.txt 24 | ok+=($login) 25 | else 26 | echo "Diff: KO" >> ../traces/${login}.txt 27 | not_ok+=($login) 28 | fi 29 | done 30 | 31 | print OK: $ok 32 | print NOT_OK: $not_ok 33 | -------------------------------------------------------------------------------- /chall00/cde-laro.c: -------------------------------------------------------------------------------- 1 | int ft_strlen(char *str) 2 | { 3 | int i; 4 | 5 | i = 0; 6 | while (str[i]) 7 | i++; 8 | return (i); 9 | } 10 | 11 | 12 | int ft_necklace(char *s1, char *s2) 13 | { 14 | int i; 15 | int j; 16 | int k; 17 | int len; 18 | 19 | i = 0; 20 | j = 0; 21 | if ((len = ft_strlen(s1)) != ft_strlen(s2)) 22 | return (0); 23 | if (len == 0) 24 | return (1); 25 | while (j < ft_strlen(s2)) 26 | { 27 | k = 0; 28 | while (k < ft_strlen(s2) && s1[(i+k) % len] == s2[(j+k) % len]) 29 | { 30 | k++; 31 | 32 | } 33 | if (k == len) 34 | return (1); 35 | j++; 36 | } 37 | return (0); 38 | } -------------------------------------------------------------------------------- /chall00/mbourand.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int compare(char *s1, char *s2, unsigned int swaps, unsigned int len) 4 | { 5 | s1 += swaps; 6 | if (len == 0) 7 | return (0); 8 | if (strncmp(s1, s2, len - swaps) != 0) 9 | return (1); 10 | s1 -= swaps; 11 | s2 += len - swaps; 12 | if (swaps == 0) 13 | return (0); 14 | if (swaps == 0 || strncmp(s1, s2, swaps) != 0) 15 | return (1); 16 | return (0); 17 | } 18 | 19 | int ft_necklace(char *s1, char *s2) 20 | { 21 | unsigned int swaps; 22 | unsigned int len; 23 | 24 | len = strlen(s1); 25 | swaps = 0; 26 | if (len != strlen(s2)) 27 | return (0); 28 | while (swaps <= len) 29 | { 30 | if (compare(s1, s2, swaps, len) == 0) 31 | return (1); 32 | swaps++; 33 | } 34 | return (0); 35 | } -------------------------------------------------------------------------------- /chall04/hbaudet.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | line = input().lstrip() 6 | if not line.isdigit(): 7 | exit("Invalid size : " + line) 8 | size = int(line) 9 | ret = [] 10 | for i in range (size): 11 | line = sys.stdin.readline() 12 | line = line.replace('\n', '') 13 | if len(line) != size: 14 | exit("Invalid line : " + line) 15 | for c in line: 16 | if "#. ".find(c) == -1: 17 | exit("Invalid character : " + c) 18 | ret.append(list(line)) 19 | 20 | for _ in range (size - 1): 21 | for i in range (size - 1): 22 | for j in range (size): 23 | if ret[i][j] == '.' and ret[i + 1][j] == ' ': 24 | ret[i][j] = ' ' 25 | ret[i + 1][j] = '.' 26 | 27 | for i in range (size): 28 | for j in range (size): 29 | print(ret[i][j], end='') 30 | print() 31 | -------------------------------------------------------------------------------- /chall00/jgroc-de.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int ft_checker(char *s1, char *s2, int i) { 5 | int j; 6 | 7 | j = 0; 8 | while (s2[j]) { 9 | if (s2[j] != s1[i]) { 10 | return 0; 11 | } 12 | ++j; 13 | ++i; 14 | if (!s1[i]) { 15 | i = 0; 16 | } 17 | } 18 | 19 | return 1; 20 | } 21 | 22 | int ft_necklace(char *s1, char *s2) { 23 | int i; 24 | 25 | if (strlen(s1) != strlen(s2)) { 26 | return 0; 27 | } 28 | if (strlen(s1) == 0) { 29 | return 1; 30 | } 31 | i = 0; 32 | while(s1[i]) { 33 | if (s2[0] == s1[i] && ft_checker(s1, s2, i)) { 34 | return 1; 35 | } 36 | ++i; 37 | } 38 | 39 | return 0; 40 | } -------------------------------------------------------------------------------- /chall00/hben-yah.c: -------------------------------------------------------------------------------- 1 | 2 | static int ft_strlen(char *s) 3 | { 4 | char *d; 5 | 6 | d = s; 7 | while (*d) 8 | ++d; 9 | return ((d - s)); 10 | } 11 | 12 | static int ft_strnequ(char *s1, char *s2, int n) 13 | { 14 | if (!s1 || !s2) 15 | return (s1 == s2); 16 | while ((*s1 || *s2) && n--) 17 | if (*(s1++) != *(s2++)) 18 | return (0); 19 | return (1); 20 | } 21 | 22 | int ft_necklace(char *s1, char *s2) 23 | { 24 | int len1; 25 | int len2; 26 | int i; 27 | 28 | len1 = ft_strlen(s1); 29 | len2 = ft_strlen(s2); 30 | if (len1 != len2) 31 | return (0); 32 | if (len1 == 0) 33 | return (1); 34 | i = 0; 35 | while (i < len1) 36 | { 37 | if (ft_strnequ(s1, s2 + i, len1 - i) 38 | && ft_strnequ(s1 + len1 - i, s2, i)) 39 | return (1); 40 | ++i; 41 | } 42 | return (0); 43 | } 44 | -------------------------------------------------------------------------------- /chall01/rturcey.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include 4 | #include 5 | 6 | char *rollon(const char *format, ...) 7 | { 8 | int i; 9 | char *s; 10 | 11 | s = NULL; 12 | i = 0; 13 | va_list ap; 14 | 15 | va_start(ap, format); 16 | if ((i = vasprintf(&s, format, ap)) == -1) 17 | { 18 | va_end(ap); 19 | return (NULL); 20 | } 21 | va_end(ap); 22 | return (s); 23 | } 24 | 25 | char *ft_rgb2hex(int r, int g, int b) 26 | { 27 | int col[3]; 28 | int i; 29 | 30 | col[0] = r; 31 | col[1] = g; 32 | col[2] = b; 33 | i = -1; 34 | while (++i < 3) 35 | if (col[i] < 0 || col[i] > 255) 36 | return (NULL); 37 | return (rollon("#%02x%02x%02x", r, g, b)); 38 | } -------------------------------------------------------------------------------- /chall04/cdittric.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import fileinput 5 | 6 | a = [] 7 | for line in fileinput.input(): 8 | if fileinput.isfirstline(): 9 | n = int(line) 10 | continue 11 | if len(line) != n + 1: 12 | exit() 13 | a.append(line) 14 | if len(a) != n: 15 | exit() 16 | 17 | b = [[' ' for x in range(n)] for y in range(n)] 18 | for x in range(n): 19 | sandCount = 0 20 | for y in range(n): 21 | if a[y][x] == '.': 22 | sandCount += 1 23 | elif a[y][x] == '#': 24 | b[y][x] = '#' 25 | for i in range(sandCount): 26 | b[y - i - 1][x] = '.' 27 | sandCount = 0 28 | for i in range(sandCount): 29 | b[y - i][x] = '.' 30 | 31 | for line in b: 32 | print("".join(line)) 33 | -------------------------------------------------------------------------------- /chall01/snicolet.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Needed to compile without warning, see 3 | ** https://github.com/nicowilliams/inplace/issues/6 4 | ** for details. 5 | */ 6 | 7 | #define _GNU_SOURCE 1 8 | #include 9 | 10 | 11 | /* 12 | ** We create a color from r, g and b (considered as char) 13 | ** using binary moves to place the correct bits at the right place, 14 | ** then we pass that color to printf, and return the allocated string. 15 | ** also a filter of 0-255 validity is added on each color componment 16 | */ 17 | 18 | char *ft_rgb2hex(int r, int g, int b) 19 | { 20 | char *color_str; 21 | unsigned int color; 22 | 23 | color = ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); 24 | if (asprintf(&color_str, "#%08x", color) < 0) 25 | return (NULL); 26 | return (color_str); 27 | } 28 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/makefile: -------------------------------------------------------------------------------- 1 | SRCS = $(addprefix srcs/, players.c) 2 | 3 | OBJS = ${SRCS:.c=.o} 4 | 5 | INCLUDES = includes 6 | 7 | INCLUDES_L = libft/includes 8 | 9 | DIR_LIBFT = libft 10 | 11 | NAME = btsp 12 | 13 | CC = clang-9 14 | 15 | CFLAGS = -g -Werror -Wextra -Wall -I ${INCLUDES_L} -I ${INCLUDES} 16 | 17 | all: makelib 18 | ${MAKE} ${NAME} 19 | 20 | ${NAME}: ${OBJS} ./${DIR_LIBFT}/libft.a 21 | ${CC} ${CFLAGS} ${OBJS} -L./${DIR_LIBFT}/ -lft -o ${NAME} 22 | 23 | makelib: 24 | ${MAKE} -C ${DIR_LIBFT} 25 | 26 | clean: 27 | ${RM} ${OBJS} 28 | ${MAKE} -C ${DIR_LIBFT} clean 29 | 30 | fclean: 31 | ${RM} ${OBJS} 32 | ${RM} ${NAME} 33 | ${MAKE} -C ${DIR_LIBFT} fclean 34 | 35 | re: fclean all 36 | 37 | test: all 38 | ../a.out ../exemple.txt btsp 39 | 40 | .PHONY: all re makelib clean fclean 41 | -------------------------------------------------------------------------------- /chall00/tmerli.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void rotate(char **str, int len) 5 | { 6 | int i = 0; 7 | char tmp = str[0][len - 1]; 8 | char tmp2; 9 | 10 | while (i < len) 11 | { 12 | tmp2 = str[0][i]; 13 | str[0][i] = tmp; 14 | tmp = tmp2; 15 | i++; 16 | } 17 | } 18 | 19 | int ft_necklace(char *str1, char *str2) 20 | { 21 | char *cp; 22 | int len = strlen(str2); 23 | int i = 0; 24 | 25 | if(len == 0 && strlen(str1) == 0) 26 | return 1; 27 | if (len != strlen(str1)) 28 | return 0; 29 | cp = (char *)malloc(len * sizeof(char)); 30 | strcpy(cp, str2); 31 | while (i < len) 32 | { 33 | if (!strcmp(cp, str1)) 34 | { 35 | return (1); 36 | free(cp); 37 | } 38 | rotate(&cp, len); 39 | i++; 40 | } 41 | free(cp); 42 | return (0); 43 | } -------------------------------------------------------------------------------- /chall00/dsy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | size_t ft_strlen(char *s) 5 | { 6 | int i; 7 | 8 | i = 0; 9 | while (s[i]) 10 | i++; 11 | return (i); 12 | } 13 | 14 | int rot_strcmp(char *s1, char *s2, size_t rot, size_t n) 15 | { 16 | size_t i; 17 | 18 | i = 0; 19 | while (i < n) 20 | { 21 | if (s1[i] != s2[(rot+i) % n]) 22 | return (0); 23 | i++; 24 | } 25 | return (1); 26 | } 27 | 28 | 29 | int ft_necklace(char *s1, char *s2) 30 | { 31 | int n; 32 | int rot; 33 | 34 | rot = 0; 35 | n = ft_strlen(s1); 36 | if (!s1 && !s2 || (s1 == "" && s2 == "")) 37 | return (1); 38 | if ((s1 && !s2) || (!s1 && s2)) 39 | return (0); 40 | if (n != ft_strlen(s2)) 41 | return (0); 42 | while (rot < n) 43 | { 44 | if (rot_strcmp(s1, s2, rot, n)) 45 | return (1); 46 | rot++; 47 | } 48 | return (0); 49 | } 50 | -------------------------------------------------------------------------------- /chall01/fel-mazo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void put_char_hex_buff(unsigned char val, char *buff, size_t offset) 4 | { 5 | char *charset = "0123456789abcdef"; 6 | unsigned char left; 7 | unsigned char right; 8 | 9 | buff += offset; 10 | left = val >> 4; 11 | right = val & 0xf; 12 | *buff = charset[left]; 13 | *(buff + 1) = charset[right]; 14 | } 15 | 16 | char *ft_rgb2hex(int r, int g, int b) 17 | { 18 | char *res; 19 | 20 | if (((r | g | b) & 0x100)) 21 | return (NULL); 22 | if (!(res = (char *)malloc(sizeof(char) * 8))) 23 | return (NULL); 24 | res[0] = '#'; 25 | put_char_hex_buff((unsigned char)r, res, 1); 26 | put_char_hex_buff((unsigned char)g, res, 3); 27 | put_char_hex_buff((unsigned char)b, res, 5); 28 | res[7] = 0; 29 | return (res); 30 | } 31 | -------------------------------------------------------------------------------- /chall02/hbaudet.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys 4 | 5 | letters = [".-", 6 | "-..." , 7 | "-.-." , 8 | "-.." , 9 | "." , 10 | "..-." , 11 | "--." , 12 | "...." , 13 | ".." , 14 | ".---" , 15 | "-.-" , 16 | ".-.." , 17 | "--" , 18 | "-." , 19 | "---" , 20 | ".--." , 21 | "--.-" , 22 | ".-." , 23 | "..." , 24 | "-" , 25 | "..-" , 26 | "...-" , 27 | ".--" , 28 | "-..-" , 29 | "-.--" , 30 | "--.."] 31 | 32 | if len(sys.argv) != 2 : 33 | sys.exit("usage: ./hbaudet.py ") 34 | if len(sys.argv[1]) < 1: 35 | sys.exit("usage: ./hbaudet.py ") 36 | for i in sys.argv[1]: 37 | if not i.isalpha() and not i == ' ': 38 | print("usage: ./hbaudet.py ") 39 | sys.exit() 40 | for i in sys.argv[1]: 41 | if i == ' ': 42 | print(i, end = '') 43 | else: 44 | print(letters[ord(i.lower()) - ord('a')], end='') 45 | print() 46 | -------------------------------------------------------------------------------- /chall00/charmstr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static int my_ft_strlen(char *str) 4 | { 5 | int i; 6 | 7 | i = 0; 8 | while (str[i]) 9 | i++; 10 | return (i); 11 | } 12 | 13 | static int my_ft_strncmp(const char *s1, const char *s2, size_t n) 14 | { 15 | size_t i; 16 | 17 | i = 0; 18 | if (!n) 19 | return (0); 20 | while ((s1[i] == s2[i]) && s1[i] && s2[i] && (i + 1 < n)) 21 | i++; 22 | return ((unsigned char)s1[i] - (unsigned char)s2[i]); 23 | } 24 | 25 | int ft_necklace(char *s1, char *s2) 26 | { 27 | int len; 28 | int j; 29 | 30 | j = -1; 31 | len = my_ft_strlen(s1); 32 | if (my_ft_strlen(s2) != len) 33 | return (0); 34 | else if (!len) 35 | return (1); 36 | while (++j < len) 37 | if (s1[j] == s2[0] && !my_ft_strncmp(s1 + j, s2, len - j) \ 38 | && !my_ft_strncmp(s1, s2 + (len - j), j)) 39 | return (1); 40 | return (0); 41 | } 42 | -------------------------------------------------------------------------------- /chall00/eparisot.c: -------------------------------------------------------------------------------- 1 | int ft_strlen(char* s) 2 | { 3 | int i; 4 | 5 | i = 0; 6 | while (s[i] != '\0') 7 | i += 1; 8 | return(i); 9 | } 10 | 11 | char *rotate(char* s) 12 | { 13 | char c = s[0]; 14 | for(int i = 0; i < ft_strlen(s); ++i) 15 | s[i] = s[i+1]; 16 | s[ft_strlen(s)-1] = c; 17 | return(s); 18 | } 19 | 20 | int is_eq(char* s1, char* s2) 21 | { 22 | for(int i = 0; i < ft_strlen(s1); ++i) 23 | { 24 | if(s1[i] == s2[i]) 25 | continue; 26 | else 27 | return(0); 28 | } 29 | return(1); 30 | } 31 | 32 | int ft_necklace(char* s1, char* s2) 33 | { 34 | int res = 0; 35 | 36 | if (ft_strlen(s1) == ft_strlen(s2)) 37 | { 38 | if (ft_strlen(s1) == 0) 39 | return(1); 40 | for (int i = 0; i < ft_strlen(s1); ++i) 41 | { 42 | s2 = rotate(s2); 43 | if (is_eq(s1, s2)) 44 | res = 1; 45 | } 46 | } 47 | else 48 | res = 0; 49 | return(res); 50 | } 51 | -------------------------------------------------------------------------------- /chall00/jriallot.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * Pour résoudre le problème, j'ai décider de partir d'une base de parcourt 5 | * complet d'une liste. J'ai donc une liste qui sera parcourru dans son 6 | * intégralité, et ce depuis son preier caractère, et le deuxième suit la même 7 | * logique mais, en décalant l'indice de début a chaque fois. 8 | */ 9 | int ft_necklace(char *s1, char *s2) { 10 | size_t i; 11 | size_t j; 12 | int ret; 13 | 14 | if (!s1 && !s2) 15 | return (1); 16 | if (!s1 ||!s2) 17 | return (0); 18 | if (strlen(s1) != strlen(s2)) 19 | return (0); 20 | i = -1; 21 | ret = 1; 22 | while (++i < strlen(s2)) 23 | { 24 | ret = 1; 25 | j = -1; 26 | while (++j < strlen(s2) && ret) 27 | { 28 | if (s1[j] != s2[(i + j) % strlen(s2)]) 29 | ret = 0; 30 | } 31 | if (ret) 32 | return (ret); 33 | } 34 | return (ret); 35 | } 36 | -------------------------------------------------------------------------------- /chall00/stoupin.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | int ft_necklace(char *s1, char *s2) 6 | { 7 | int i; 8 | int j; 9 | int len1; 10 | int len2; 11 | int match; 12 | 13 | len1 = 0; 14 | while (s1[len1] != '\0') 15 | len1++; 16 | 17 | len2 = 0; 18 | while (s2[len2] != '\0') 19 | len2++; 20 | 21 | if (len1 != len2) 22 | return (0); 23 | 24 | if (len1 == 0) 25 | return (1); 26 | 27 | i = 0; 28 | while (i < len1) 29 | { 30 | j = 0; 31 | match = 1; 32 | while (j < len2) 33 | { 34 | if (s1[j] != s2[(i + j) % len2]) { 35 | match = 0; 36 | break; 37 | } 38 | j++; 39 | } 40 | if (match) 41 | return (1); 42 | i++; 43 | } 44 | return (0); 45 | } 46 | -------------------------------------------------------------------------------- /chall01/expected_output.txt: -------------------------------------------------------------------------------- 1 | test: ft_rgb2hex(252, 186, 3) 2 | expected_output: '#fcba03' user_output: '#fcba03' 3 | test: ft_rgb2hex(70, 235, 52) 4 | expected_output: '#46eb34' user_output: '#46eb34' 5 | test: ft_rgb2hex(159, 52, 235) 6 | expected_output: '#9f34eb' user_output: '#9f34eb' 7 | test: ft_rgb2hex(52, 101, 235) 8 | expected_output: '#3465eb' user_output: '#3465eb' 9 | test: ft_rgb2hex(52, 235, 119) 10 | expected_output: '#34eb77' user_output: '#34eb77' 11 | test: ft_rgb2hex(208, 235, 52) 12 | expected_output: '#d0eb34' user_output: '#d0eb34' 13 | test: ft_rgb2hex(0, 0, 255) 14 | expected_output: '#0000ff' user_output: '#0000ff' 15 | test: ft_rgb2hex(0, 255, 0) 16 | expected_output: '#00ff00' user_output: '#00ff00' 17 | test: ft_rgb2hex(255, 0, 0) 18 | expected_output: '#ff0000' user_output: '#ff0000' 19 | test: ft_rgb2hex(255, 255, 255) 20 | expected_output: '#ffffff' user_output: '#ffffff' 21 | -------------------------------------------------------------------------------- /chall00/cyhuet.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static char *shift_char(char *s1) 6 | { 7 | char *ret = malloc(strlen(s1) + 1); 8 | char front; 9 | int i; 10 | 11 | front = *s1; 12 | for (i = 0; i < strlen(s1) - 1; i++) 13 | { 14 | ret[i] = s1[i + 1]; 15 | } 16 | ret[i++] = front; 17 | ret[i] = 0; 18 | return ret; 19 | } 20 | 21 | int ft_necklace(char *s1, char *s2) 22 | { 23 | s1 = strdup(s1); 24 | if (strlen(s1) != strlen(s2)) 25 | return 0; 26 | if (strlen(s1) == 0 && strlen(s2) == 0) 27 | return (1); 28 | for (int i = 0; i < strlen(s1); i++) 29 | { 30 | char *tmp = s1; 31 | s1 = shift_char(s1); 32 | free(tmp); 33 | if (strcmp(s1, s2) == 0) 34 | { 35 | free(s1); 36 | return (1); 37 | } 38 | } 39 | free(s1); 40 | return (0); 41 | } 42 | 43 | int main() 44 | { 45 | ft_necklace("nicole", "icolen"); 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /chall02/mbourand.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import string 5 | 6 | ALPHABET = { 7 | 'A':'.-', 'B':'-...', 'C':'-.-.', 8 | 'D':'-..', 'E':'.', 'F':'..-.', 9 | 'G':'--.', 'H':'....', 'I':'..', 10 | 'J':'.---', 'K':'-.-', 'L':'.-..', 11 | 'M':'--', 'N':'-.', 'O':'---', 12 | 'P':'.--.', 'Q':'--.-', 'R':'.-.', 13 | 'S':'...', 'T':'-', 'U':'..-', 14 | 'V':'...-', 'W':'.--', 'X':'-..-', 15 | 'Y':'-.--', 'Z':'--..', ' ':' ' 16 | } 17 | 18 | AUTHORIZED_CHARACTERS = set(string.ascii_letters + ' ') 19 | 20 | def str2morse(str): 21 | str = str.upper() 22 | for c in str: 23 | print(ALPHABET[c], end='') 24 | print("") 25 | 26 | if __name__ == "__main__": 27 | if (len(sys.argv) != 2 or not set(sys.argv[1]).issubset(AUTHORIZED_CHARACTERS) or len(sys.argv[1]) == 0): 28 | print("usage: ./mbourand.py ") 29 | else: 30 | str2morse(sys.argv[1]) 31 | -------------------------------------------------------------------------------- /chall03/aguiot--.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "net/http" 7 | "time" 8 | ) 9 | 10 | func makeGetRequest(url string, startTime time.Time) string { 11 | fmt.Printf("%4dms - GET %s\n", time.Since(startTime).Milliseconds(), url) 12 | resp, _ := http.Get(url) 13 | bodyBytes, _ := ioutil.ReadAll(resp.Body) 14 | body := string(bodyBytes) 15 | fmt.Printf("%4dms - GET %s\n\tanswer:%s\n", time.Since(startTime).Milliseconds(), url, body) 16 | return body 17 | } 18 | 19 | func main() { 20 | var id, r, g, b int32 21 | startTime := time.Now() 22 | 23 | body := makeGetRequest("http://0.0.0.0:8080/", startTime) 24 | fmt.Sscanf(body, "id=%d,r=%d,g=%d,b=%d", &id, &r, &g, &b) 25 | resp := fmt.Sprintf("?id=%d&resp=%02x%02x%02x", id, r, g, b) 26 | body = makeGetRequest("http://0.0.0.0:8080/" + resp, startTime) 27 | 28 | fmt.Printf("%4dms - DONE\n", time.Since(startTime).Milliseconds()) 29 | } 30 | -------------------------------------------------------------------------------- /chall03/juligonz.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "net/http" 7 | "time" 8 | ) 9 | 10 | // Getbody Print the query time and the body. Return the body from the GET query. 11 | func Getbody(url string) string { 12 | start := time.Now() 13 | resp, _ := http.Get(url) 14 | bytes, _ := ioutil.ReadAll(resp.Body) 15 | body := string(bytes) 16 | fmt.Printf("• %4dms - GET %s\n %s\n\n", time.Since(start).Milliseconds(), url, body) 17 | return body 18 | } 19 | 20 | // Getparams Build and return the parameter string 21 | func Getparams(body string) string { 22 | var id, r, g, b int 23 | fmt.Sscanf(body, "id=%d,r=%d,g=%d,b=%d", &id, &r, &g, &b) 24 | params := fmt.Sprintf("?id=%d&resp=%02x%02x%02x", id, r, g, b) 25 | return params 26 | } 27 | 28 | func main() { 29 | url := "http://0.0.0.0:8080/" 30 | 31 | body := Getbody(url) 32 | params := Getparams(body) 33 | Getbody(url + params) 34 | } 35 | -------------------------------------------------------------------------------- /chall04/hthomas.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import string 4 | 5 | def swap(x,y): 6 | x, y = y, x 7 | 8 | def get_inputs(): 9 | n = input() 10 | lines = [] 11 | for _ in range(n): 12 | lines.append(list(raw_input())) 13 | return n, lines 14 | 15 | def check_inputs(n, lines): 16 | for line in lines: 17 | if not len(line) == n: 18 | print ("All lines must be N-characters long") 19 | return 0 20 | return 1 21 | 22 | if __name__ == "__main__": 23 | n, lines = get_inputs() 24 | if not check_inputs(n, lines): 25 | exit(-1) 26 | for _ in range(n): 27 | for nbline in range(n - 1): 28 | for nbcol in range(n): 29 | if lines[nbline][nbcol] == '.' and lines[nbline + 1][nbcol] == ' ': 30 | tmp = lines[nbline][nbcol] 31 | lines[nbline][nbcol] = lines[nbline + 1][nbcol] 32 | lines[nbline + 1][nbcol] = tmp 33 | for line in lines: 34 | str1 = ''.join(line) 35 | print(str1) 36 | -------------------------------------------------------------------------------- /chall00/sadahan.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int ft_necklace(char *s1, char *s2) 4 | { 5 | int i; 6 | int i2; 7 | int j; 8 | 9 | i = 0; 10 | if (!s1 && !s2) 11 | return (1); 12 | if (!s1 || !s2) 13 | return (0); 14 | if (strlen(s1) != strlen(s2)) 15 | return (0); 16 | if (strcmp(s1, s2) == 0) 17 | return (1); 18 | i2 = 0; 19 | while (i2 < strlen(s2)) 20 | { 21 | if (s1[0] == s2[i2]) 22 | { 23 | j = i2; 24 | while (i < strlen(s1)) 25 | { 26 | if (s1[i] != s2[j]) 27 | break; 28 | j++; 29 | if (j == strlen(s2)) 30 | j = 0; 31 | i++; 32 | } 33 | if (i == strlen(s1)) 34 | return (1); 35 | } 36 | i2++; 37 | } 38 | return (0); 39 | } 40 | -------------------------------------------------------------------------------- /chall02/charoua.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | import sys 3 | 4 | morse = dict(A='.-', B='-... ', C='-.-.', D='-..', E='.', F='..-.', G='--.', 5 | H='....', I='..', J='.---', K='-.-', L='.-..', M='--', N='-.', 6 | O='---', P='.--.', Q='--.-', R='.-.', S='...', T='-', U='..-', 7 | V='...-', W='.--', X='-..-', Y='-.--', Z='--..') 8 | 9 | def main(): 10 | if len(sys.argv) == 2 and len(sys.argv[1]) > 0: 11 | print(morse_string(sys.argv[1])) 12 | else: 13 | print("usage: ./charoua.py ") 14 | 15 | def morse_string(str): 16 | if "".join(str.split()).isalpha(): 17 | new = "".join((morse_char(c)) for c in str) 18 | return new 19 | else : 20 | return "usage: ./charoua.py " 21 | 22 | def morse_char(c): 23 | if c.isalpha(): 24 | return morse[c.upper()] 25 | else: 26 | return c 27 | 28 | if __name__ == "__main__": 29 | main() 30 | -------------------------------------------------------------------------------- /chall02/mchardin.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import re 3 | import string 4 | 5 | def main(args=None): 6 | if args is None or len(args) != 1: 7 | print("usage: ./mchardin.py ") 8 | exit() 9 | right_chars = re.compile("[" + string.ascii_letters + " " + "]") 10 | if len(args[0]) == 0 or len(args[0]) != len(re.findall(right_chars, args[0])): 11 | print("usage: ./mchardin.py ") 12 | exit() 13 | to_morse = args[0].upper() 14 | morse_list = [".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--.."] 15 | for i in range(len(to_morse)): 16 | if to_morse[i] == ' ': 17 | print(" ", end='') 18 | else: 19 | print(morse_list[ord(to_morse[i]) - ord('A')], end='') 20 | print("") 21 | 22 | if __name__ == "__main__": 23 | main(sys.argv[1::]) -------------------------------------------------------------------------------- /chall04/frdescam.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | def apply_gravity(matrix, width, x, y) : 4 | while y < width - 1 and matrix[y + 1][x] == ' ' : 5 | matrix[y][x] = ' ' 6 | matrix[y + 1][x] = '.' 7 | y = y + 1 8 | 9 | def get_matrix_final_state(matrix, width) : 10 | for x in range(width) : 11 | for y in range(width - 1, -1, -1) : 12 | if matrix[y][x] == '.' : 13 | apply_gravity(matrix, width, x, y) 14 | return matrix 15 | 16 | def print_matrix(matrix, width) : 17 | for i in range(width) : 18 | for j in range(width) : 19 | print(matrix[i][j], end='') 20 | print("") 21 | 22 | def main() : 23 | # Get map from stdin 24 | width = int(input()) 25 | matrix = [] 26 | for i in range(width): 27 | matrix.append(list(input())) 28 | final_matrix = get_matrix_final_state(matrix, width) 29 | print_matrix(final_matrix, width) 30 | 31 | if __name__ == "__main__": 32 | main() 33 | -------------------------------------------------------------------------------- /chall01/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | char *ft_rgb2hex(int r, int g, int b); 6 | 7 | void assert_results(int r, int g, int b, char *expected) { 8 | char *result; 9 | result = ft_rgb2hex(r, g, b); 10 | printf("test: ft_rgb2hex(%d, %d, %d)\nexpected_output: '%s' ", r, g, b, expected); 11 | printf("user_output: '%s'\n", result); 12 | assert(!strcmp(result, expected)); 13 | } 14 | 15 | int main() { 16 | assert_results(252, 186, 3, "#fcba03"); 17 | assert_results(70, 235, 52, "#46eb34"); 18 | assert_results(159, 52, 235, "#9f34eb"); 19 | assert_results(52, 101, 235, "#3465eb"); 20 | assert_results(52, 235, 119, "#34eb77"); 21 | assert_results(208, 235, 52, "#d0eb34"); 22 | assert_results(0, 0, 255, "#0000ff"); 23 | assert_results(0, 255, 0, "#00ff00"); 24 | assert_results(255, 0, 0, "#ff0000"); 25 | assert_results(255, 255, 255, "#ffffff"); 26 | } 27 | -------------------------------------------------------------------------------- /chall04/juligonz.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | 5 | class Grid: 6 | AIR = ' ' 7 | SAND = '.' 8 | STONE = '#' 9 | 10 | def __init__(self): 11 | lines = str(sys.stdin.read()).split('\n') 12 | self.size = int(lines[0]) # save size, not really usefull but why not 13 | self.grid = [list(x) for x in lines[1:-1]] # save the lines (except first line) as a 2d array of char 14 | 15 | def update(self): 16 | is_updated = 0 17 | for col in range(0, len(self.grid[0]) ): 18 | for row in range(len(self.grid) - 2, -1, -1): 19 | if self.grid[row][col] == self.SAND: 20 | if self.grid[row + 1][col] == self.AIR: 21 | self.grid[row][col] = self.AIR 22 | self.grid[row + 1][col] = self.SAND 23 | is_updated = 1 24 | return (is_updated) 25 | 26 | def __str__(self): 27 | return ( 28 | "\n".join( 29 | ["".join(c) for c in self.grid] 30 | ) 31 | ) 32 | 33 | grid = Grid() 34 | 35 | while True: 36 | if (grid.update() == 0): 37 | print(grid) 38 | exit() 39 | -------------------------------------------------------------------------------- /chall02/hben-yah.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import sys 4 | import re 5 | 6 | morseDic = { 7 | 'a':'.-', 8 | 'b':'-...', 9 | 'c':'-.-.', 10 | 'd':'-..', 11 | 'e':'.', 12 | 'f':'..-.', 13 | 'g':'--.', 14 | 'h':'....', 15 | 'i':'..', 16 | 'j':'.---', 17 | 'k':'-.-', 18 | 'l':'.-..', 19 | 'm':'--', 20 | 'n':'-.', 21 | 'o':'---', 22 | 'p':'.--.', 23 | 'q':'--.-', 24 | 'r':'.-.', 25 | 's':'...', 26 | 't':'-', 27 | 'u':'..-', 28 | 'v':'...-', 29 | 'w':'.--', 30 | 'x':'-..-', 31 | 'y':'-.--', 32 | 'z':'--..' 33 | } 34 | 35 | def usage(): 36 | print("usage: ./hben-yah.py ") 37 | exit() 38 | 39 | def str_replace(text, dic): 40 | rc = re.compile('|'.join(map(re.escape, dic))) 41 | def trans(match): 42 | return dic[match.group(0)] 43 | return rc.sub(trans, text) 44 | 45 | 46 | if len(sys.argv) != 2: 47 | usage() 48 | 49 | word = sys.argv[1] 50 | if not re.match("^[A-Za-z0-9 ]*$", word) or len(word) == 0: 51 | usage() 52 | 53 | morse = str_replace(word.lower(), morseDic) 54 | 55 | print(morse) -------------------------------------------------------------------------------- /chall00/ymarcill.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int ft_necklace(char *s1, char *s2) 7 | { 8 | int i; 9 | int y; 10 | int savey; 11 | int savex; 12 | int nb; 13 | int check; 14 | 15 | i = 0; 16 | y = 0; 17 | nb = 0; 18 | savex = 0; 19 | check = 0; 20 | if (strlen(s2) != strlen(s1)) 21 | return (0); 22 | if (!s1[0] && !s2[0]) 23 | return (1); 24 | while (s1[i] && s2[y]) 25 | { 26 | check++; 27 | if (s1[i] == s2[y]) 28 | { 29 | savey = y; 30 | nb = 0; 31 | while ((s1[i] && s2[y]) || y < savex) 32 | { 33 | if (s1[i] != s2[y]) 34 | { 35 | nb = 1; 36 | i = 0; 37 | break ; 38 | } 39 | y++; 40 | i++; 41 | } 42 | if (nb != 1 && (y == savex || i == y)) 43 | return (1); 44 | else if ((nb == 1 && check >= strlen(s2))) 45 | return (0); 46 | savex = savey; 47 | if (y == strlen(s2)) 48 | y = -1; 49 | else 50 | y--; 51 | } 52 | y++; 53 | } 54 | return (0); 55 | } 56 | -------------------------------------------------------------------------------- /chall00/charoua.c: -------------------------------------------------------------------------------- 1 | int ft_check(int start, char *s1, char *s2) 2 | { 3 | int i; 4 | int j; 5 | int k; 6 | 7 | j = 0; 8 | k = 0; 9 | i = start; 10 | while (s1[i] != '\0' && s2[j] != '\0') 11 | { 12 | if (s1[i] != s2[j]) 13 | return (0); 14 | i++; 15 | j++; 16 | } 17 | if (s1[i] != '\0') 18 | return (0); 19 | while ((k < start) || s2[j] != '\0') 20 | { 21 | if (s1[k] != s2[j]) 22 | return (0); 23 | k++; 24 | j++; 25 | } 26 | if ((s2[j] != '\0') || (k != start)) 27 | return (0); 28 | return (1); 29 | } 30 | 31 | int ft_necklace(char *s1, char *s2) 32 | { 33 | int i; 34 | 35 | i = 0; 36 | if (s1 && s2) 37 | { 38 | if (s1[i] == '\0' && s2[i] == '\0') 39 | return (1); 40 | while (s1[i] != '\0' || s2[0] != '\0') 41 | { 42 | while (s1[i] != '\0') 43 | { 44 | if (s1[i] == s2[0]) 45 | break; 46 | i++; 47 | } 48 | if (s1[i] == '\0') 49 | return (0); 50 | else if (ft_check(i, s1, s2) == 1) 51 | return (1); 52 | i++; 53 | } 54 | } 55 | return (0); 56 | } 57 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_abs.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_abs.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/14 14:48:22 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/14 15:03:24 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_abs(int n) 14 | { 15 | return (n < 0 ? -n : n); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/math/ft_abs.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_abs.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/05/21 13:58:56 by hben-yah #+# #+# */ 9 | /* Updated: 2019/11/27 10:48:25 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_abs(int i) 14 | { 15 | return (i < 0 ? -i : i); 16 | } 17 | -------------------------------------------------------------------------------- /chall03/etieberg.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | "io/ioutil" 6 | "log" 7 | "fmt" 8 | "regexp" 9 | "strconv" 10 | ) 11 | 12 | func main() { 13 | resp, err := http.Get("http://0.0.0.0:8080/") 14 | if err != nil { 15 | log.Fatal(err) 16 | return 17 | } 18 | defer resp.Body.Close() 19 | body, err := ioutil.ReadAll(resp.Body) 20 | if err != nil { 21 | log.Fatal(err) 22 | return 23 | } 24 | s := string(body) 25 | re := regexp.MustCompile(`(?:id|r|g|b)=(\d*)`) 26 | submatchall := re.FindAllStringSubmatch(s, -1) 27 | if (len(submatchall) != 5) { 28 | return 29 | } 30 | r, _ := strconv.Atoi(submatchall[1][1]) 31 | g, _ := strconv.Atoi(submatchall[2][1]) 32 | b, _ := strconv.Atoi(submatchall[3][1]) 33 | hex := fmt.Sprintf("%02x%02x%02x", r, g, b) 34 | url := fmt.Sprintf("http://0.0.0.0:8080/?id=%s&resp=%s", submatchall[0][1], hex) 35 | send, err := http.Get(url) 36 | if err != nil { 37 | log.Fatal(err) 38 | return 39 | } 40 | defer send.Body.Close() 41 | fmt.Printf("%d\n", send.StatusCode) 42 | } 43 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/cdittric/main.h: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* main.h :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: cdittric +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2020/06/02 19:56:00 by cdittric #+# #+# */ 9 | /* Updated: 2020/06/02 19:56:00 by cdittric ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #ifndef MAIN_H 14 | # define MAIN_H 15 | 16 | # include 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/math/ft_max.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_max.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/06/07 15:14:25 by hben-yah #+# #+# */ 9 | /* Updated: 2019/11/20 07:38:34 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_max(int a, int b) 14 | { 15 | return (a > b ? a : b); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isascii.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isascii.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 19:57:22 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 19:57:24 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isascii(int c) 14 | { 15 | return (c >= 0 && c <= 127); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_labs.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_labs.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/14 15:04:50 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/14 15:20:06 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | long int ft_labs(long int n) 14 | { 15 | return (n < 0 ? -n : n); 16 | } 17 | -------------------------------------------------------------------------------- /chall00/alesanto.c: -------------------------------------------------------------------------------- 1 | # include 2 | # include 3 | 4 | char *ft_strnstr(char *s1, char *s2, int n) 5 | { 6 | int i; 7 | int j; 8 | 9 | if (!s2[0]) 10 | return ((char *)s1); 11 | i = 0; 12 | while (s1[i] && i < n) 13 | { 14 | j = 0; 15 | while (s2[j] == s1[i + j] && i + j < n) 16 | { 17 | if (s2[j + 1] == '\0') 18 | { 19 | return ((char *)s1 + i); 20 | } 21 | j++; 22 | } 23 | i++; 24 | } 25 | return (0); 26 | } 27 | 28 | int ft_necklace(char *neck1, char*neck2) 29 | { 30 | int i; 31 | int j; 32 | char *neck22; 33 | 34 | i = 0; 35 | j = 0; 36 | while (neck1[i]) 37 | i++; 38 | while (neck2[j]) 39 | j++; 40 | if (j != i) 41 | return (0); 42 | neck22 = malloc(sizeof(char) * ( i * 2 + 1)); 43 | j = 0; 44 | while(neck2[j]) 45 | { 46 | neck22[j] = neck2[j]; 47 | j++; 48 | } 49 | j = 0; 50 | while(neck2[j]) 51 | { 52 | neck22[i + j] = neck2[j]; 53 | j++; 54 | } 55 | neck22[i + j] = '\0'; 56 | if (!(ft_strnstr(neck22, neck1, i * 2))) 57 | return(0); 58 | return(1); 59 | } 60 | -------------------------------------------------------------------------------- /chall00/esidelar.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | char *ft_add_char(char *s1, char const s2) 6 | { 7 | unsigned int i; 8 | char *str; 9 | 10 | i = strlen(s1); 11 | if (!(str = (char *)malloc(sizeof(char) * (i + 2)))) 12 | return (NULL); 13 | i = 0; 14 | while (s1[i]) 15 | { 16 | str[i] = s1[i]; 17 | i++; 18 | } 19 | str[i] = s2; 20 | str[++i] = '\0'; 21 | return (str); 22 | } 23 | 24 | 25 | int ft_necklace(char *s1, char *s2) 26 | { 27 | int i; 28 | char *str; 29 | char *temp; 30 | 31 | i = 0; 32 | if ((!s1 && !s2) || (!strlen(s1) && !strlen(s2))) 33 | return (1); 34 | else if (!s1 || !s2) 35 | return (0); 36 | else if (strlen(s1) != strlen(s2)) 37 | return (0); 38 | i = strlen(s1); 39 | str = strdup(s1); 40 | while (i) 41 | { 42 | if (!strcmp(str, s2)) 43 | return (1); 44 | temp = ft_add_char(str + 1, str[0]); 45 | free(str); 46 | str = strdup(temp); 47 | free(temp); 48 | i--; 49 | } 50 | if (!strcmp(str, s2)) 51 | return (1); 52 | return (0); 53 | } 54 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isdigit.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isdigit.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 19:52:51 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 19:52:52 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isdigit(int c) 14 | { 15 | return (c >= '0' && c <= '9'); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isprint.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isprint.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 19:57:51 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 19:57:52 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isprint(int c) 14 | { 15 | return (c >= 32 && c <= 126); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_llabs.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_llabs.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/15 12:19:25 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/15 12:20:07 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | long long ft_llabs(long long n) 14 | { 15 | return (n < 0 ? -n : n); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_strclr.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_strclr.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/24 07:33:16 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/24 07:35:29 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | void ft_strclr(char *s) 14 | { 15 | while (*s) 16 | *s++ = '\0'; 17 | } 18 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_isascii.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isascii.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:51:26 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:51:28 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isascii(int c) 14 | { 15 | return (c >= 0 && c <= 127); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/math/ft_min.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_min.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/06/07 15:08:03 by hben-yah #+# #+# */ 9 | /* Updated: 2019/11/27 10:38:05 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_min(double a, double b) 14 | { 15 | return (a < b ? a : b); 16 | } 17 | -------------------------------------------------------------------------------- /chall02/jergauth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from sys import argv 4 | from string import ascii_lowercase 5 | 6 | morse_values = [ 7 | ".-", 8 | "-...", 9 | "-.-.", 10 | "-..", 11 | ".", 12 | "..-.", 13 | "--.", 14 | "....", 15 | "..", 16 | ".---", 17 | "-.-", 18 | ".-..", 19 | "--", 20 | "-.", 21 | "---", 22 | ".--.", 23 | "--.-", 24 | ".-.", 25 | "...", 26 | "-", 27 | "..-", 28 | "...-", 29 | ".--", 30 | "-..-", 31 | "-.--", 32 | "--..", 33 | ] 34 | morse = {k: v for k, v in zip(ascii_lowercase, morse_values)} 35 | 36 | 37 | def isAlphaString(s): 38 | return all([True if c in morse or c == " " else False for c in s.lower()]) 39 | 40 | 41 | def encode(s): 42 | return "".join([morse[c] if c in morse else c for c in s.lower()]) 43 | 44 | 45 | if __name__ == "__main__": 46 | if len(argv) == 2 and argv[1] and isAlphaString(argv[1]): 47 | print(encode(argv[1])) 48 | else: 49 | print("usage: ./jergauth.py ") 50 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_isdigit.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isdigit.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:48:44 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:48:47 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isdigit(int c) 14 | { 15 | return (c >= '0' && c <= '9'); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_islower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_islower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:34:55 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:34:59 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_islower(int c) 14 | { 15 | return (c >= 'a' && c <= 'z'); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_isprint.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isprint.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:51:16 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:51:18 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isprint(int c) 14 | { 15 | return (c >= ' ' && c <= '~'); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_isupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:35:36 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:35:37 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isupper(int c) 14 | { 15 | return (c >= 'A' && c <= 'Z'); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/math/ft_ldabs.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_ldabs.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/11/27 10:47:02 by hben-yah #+# #+# */ 9 | /* Updated: 2019/11/27 10:47:15 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | long double ft_ldabs(long double d) 14 | { 15 | return (d < 0 ? -d : d); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_iscntrl.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_iscntrl.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/09/13 09:25:10 by juligonz #+# #+# */ 9 | /* Updated: 2019/09/13 09:27:37 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_iscntrl(int c) 14 | { 15 | return ((c >= 0 && c <= 31) || c == 127); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/math/ft_abs.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_abs.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/11 13:09:22 by roalvare #+# #+# */ 9 | /* Updated: 2020/05/01 18:38:44 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_abs(int n) 14 | { 15 | if (n < 0) 16 | return (-n); 17 | return (n); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putchar.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 16:12:09 by juligonz #+# #+# */ 9 | /* Updated: 2019/10/08 08:32:27 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putchar(char c) 16 | { 17 | write(1, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putnbr.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 16:17:53 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 19:48:14 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putnbr(int n) 16 | { 17 | ft_putnbr_fd(n, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/memartin/libft/ft_putchar.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: memartin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2020/02/04 18:18:55 by memartin #+# #+# */ 9 | /* Updated: 2020/02/04 18:18:57 by memartin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | void ft_putchar(char c) 16 | { 17 | write(1, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/string/ft_strclr.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_strclr.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/04 17:18:06 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/04 17:18:07 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | void ft_strclr(char *s) 14 | { 15 | if (s) 16 | while (*s) 17 | *(s++) = 0; 18 | } 19 | -------------------------------------------------------------------------------- /chall04/ltouret.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | def rotate_map(mymap, size): 3 | out = [] 4 | counter = 0 5 | while (counter < size): 6 | tmp = "" 7 | for i in mymap: 8 | tmp += i[counter] 9 | out.append(tmp) 10 | counter += 1 11 | return (out) 12 | 13 | def move(mymap, size): 14 | out = [] 15 | for line in mymap: 16 | line = list(line) 17 | for n, char in enumerate(line[::-1]): 18 | if (char == "."): 19 | index = size - n - 1 20 | for i in range(index + 1, size): 21 | if (line[i] == " "): 22 | line[i] = "." 23 | line[i - 1] = " " 24 | elif (line[i] == "#"): 25 | break 26 | out.append("".join(line)) 27 | return (out) 28 | 29 | def show_map(mymap): 30 | for i in mymap: 31 | print(i) 32 | 33 | def main() : 34 | size = int(input("gimme map size\n")) 35 | mymap = [] 36 | 37 | for i in range(size): 38 | mymap.append(input()) 39 | 40 | mymap = rotate_map(mymap, size) 41 | mymap = move(mymap, size) 42 | mymap = rotate_map(mymap, size) 43 | show_map(mymap) 44 | 45 | if __name__ == "__main__": 46 | main() 47 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_putchar_fd.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar_fd.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/08 15:04:35 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/08 15:09:06 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putchar_fd(char c, int fd) 16 | { 17 | write(fd, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/output/ft_putchar.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/04 17:21:39 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/04 17:21:40 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | void ft_putchar(char c) 16 | { 17 | write(1, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_bzero.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_bzero.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 20:23:22 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 20:23:24 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_bzero(void *s, size_t n) 16 | { 17 | ft_memset(s, 0, n); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isalpha.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isalpha.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 16:34:22 by juligonz #+# #+# */ 9 | /* Updated: 2019/10/07 18:00:43 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isalpha(int c) 14 | { 15 | return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mchardin/libft/is/ft_isascii.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isascii.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: mchardin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:08:31 by mchardin #+# #+# */ 9 | /* Updated: 2019/10/19 14:25:53 by mchardin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isascii(int c) 14 | { 15 | if (c >= 0 && c <= 127) 16 | return (1); 17 | return (0); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/is/ft_isascii.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isascii.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 16:16:50 by roalvare #+# #+# */ 9 | /* Updated: 2019/10/07 16:30:11 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isascii(int c) 14 | { 15 | if (c >= 0 && c <= 127) 16 | return (1); 17 | return (0); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_isspace_wnt.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isspace_wnt.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/05 15:08:15 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/05 15:08:17 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isspace_wnt(int c) 14 | { 15 | return (c == ' ' || c == '\n' || c == '\t'); 16 | } 17 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_islower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_islower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: jugonzal +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/08/06 22:06:33 by jugonzal #+# #+# */ 9 | /* Updated: 2019/08/13 20:04:10 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_islower(int c) 16 | { 17 | return (c >= 'a' && c <= 'z'); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 20:02:49 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 20:04:24 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isupper(int c) 16 | { 17 | return (c >= 'A' && c <= 'Z'); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_memdel.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_memdel.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 20:12:26 by juligonz #+# #+# */ 9 | /* Updated: 2019/10/09 22:40:08 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | void ft_memdel(void **ap) 16 | { 17 | free(*ap); 18 | *ap = NULL; 19 | } 20 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putchar_fd.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar_fd.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 16:36:07 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 16:36:07 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putchar_fd(char c, int fd) 16 | { 17 | write(fd, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putstr.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putstr.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 16:14:15 by juligonz #+# #+# */ 9 | /* Updated: 2019/10/08 09:06:33 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putstr(char const *s) 16 | { 17 | write(1, s, ft_strlen(s)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_tolower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_tolower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 20:00:58 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 20:01:01 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_tolower(int c) 14 | { 15 | if (c >= 'A' && c <= 'Z') 16 | c += 32; 17 | return (c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_toupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_toupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 19:58:44 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 19:58:45 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_toupper(int c) 14 | { 15 | if (c >= 'a' && c <= 'z') 16 | c -= 32; 17 | return (c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mchardin/libft/is/ft_isdigit.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isdigit.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: mchardin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 14:59:03 by mchardin #+# #+# */ 9 | /* Updated: 2019/10/19 14:25:53 by mchardin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isdigit(int c) 14 | { 15 | if (c >= '0' && c <= '9') 16 | return (1); 17 | return (0); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mchardin/libft/is/ft_isprint.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isprint.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: mchardin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:00:21 by mchardin #+# #+# */ 9 | /* Updated: 2019/11/13 10:29:02 by mchardin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isprint(int c) 14 | { 15 | if (c >= 32 && c <= 126) 16 | return (1); 17 | return (0); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mchardin/libft/put/ft_putchar_fd.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar_fd.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: mchardin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/09 15:03:06 by mchardin #+# #+# */ 9 | /* Updated: 2019/10/21 19:42:29 by mchardin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | void ft_putchar_fd(char c, int fd) 16 | { 17 | write(fd, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/is/ft_isdigit.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isdigit.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:23:20 by roalvare #+# #+# */ 9 | /* Updated: 2019/10/07 15:27:59 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isdigit(int c) 14 | { 15 | if (c >= '0' && c <= '9') 16 | return (1); 17 | return (0); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/is/ft_isprint.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isprint.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 16:32:33 by roalvare #+# #+# */ 9 | /* Updated: 2019/10/07 16:35:21 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isprint(int c) 14 | { 15 | if (c >= 32 && c <= 126) 16 | return (1); 17 | return (0); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/put/ft_putchar_fd.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar_fd.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/11 10:26:20 by roalvare #+# #+# */ 9 | /* Updated: 2020/05/01 18:38:44 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putchar_fd(char c, int fd) 16 | { 17 | write(fd, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /chall01/bapmarti.c: -------------------------------------------------------------------------------- 1 | //#include 2 | #include 3 | #include 4 | //#include 5 | 6 | void convert_base(int n, char *result, int i) 7 | { 8 | int remind; 9 | 10 | remind = n; 11 | if (n <= 16) 12 | { 13 | result[i] = '0'; 14 | i++; 15 | } 16 | while (n != 0) 17 | { 18 | remind = n % 16; 19 | if ( remind < 10) 20 | remind = remind + 48; 21 | else 22 | remind = remind + 55; 23 | result[i] = remind; 24 | i++; 25 | n = n / 16; 26 | } 27 | } 28 | 29 | char *ft_rgb2hex(int r, int g, int b) 30 | { 31 | int i; 32 | char *result; 33 | 34 | if (!(result = malloc(sizeof(char) * 8))) 35 | return (0); 36 | if ((r < 0 || r > 255) || (g < 0 || g > 255) || (b < 0|| b > 255)) 37 | return (0); 38 | i = 0; 39 | result[i] = '#'; 40 | i++; 41 | convert_base(r, result, i); 42 | i+=2; 43 | convert_base(g, result, i); 44 | i+=2; 45 | convert_base(b, result, i); 46 | result[8]= '\0'; 47 | return (result); 48 | } 49 | 50 | //int main() 51 | //{ 52 | // printf("hex: %s\n", ft_rgb2hex(12, 265, 12)); 53 | // return (0); 54 | //} 55 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_putstr_fd.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putstr_fd.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/08 15:09:51 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/08 15:12:03 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putstr_fd(char *s, int fd) 16 | { 17 | write(fd, s, ft_strlen(s)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mchardin/libft/conv/ft_tolower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_tolower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: mchardin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:26:35 by mchardin #+# #+# */ 9 | /* Updated: 2019/10/19 14:25:53 by mchardin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_tolower(int c) 14 | { 15 | if (c >= 'A' && c <= 'Z') 16 | return (c + 32); 17 | return (c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mchardin/libft/conv/ft_toupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_toupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: mchardin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:18:32 by mchardin #+# #+# */ 9 | /* Updated: 2019/10/19 14:25:53 by mchardin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_toupper(int c) 14 | { 15 | if (c >= 'a' && c <= 'z') 16 | return (c - 32); 17 | return (c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/conv/ft_tolower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_tolower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 17:01:28 by roalvare #+# #+# */ 9 | /* Updated: 2019/10/07 17:05:09 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_tolower(int c) 14 | { 15 | if (c >= 'A' && c <= 'Z') 16 | return (c + 32); 17 | return (c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/conv/ft_toupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_toupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 16:43:18 by roalvare #+# #+# */ 9 | /* Updated: 2019/10/07 16:51:01 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_toupper(int c) 14 | { 15 | if (c >= 'a' && c <= 'z') 16 | return (c - 32); 17 | return (c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/roalvare/libft/mem/ft_bzero.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_bzero.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: roalvare +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/08 17:45:32 by roalvare #+# #+# */ 9 | /* Updated: 2019/10/08 17:50:15 by roalvare ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void *ft_bzero(void *s, size_t n) 16 | { 17 | return (ft_memset(s, 0, n)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/misc/ft_tolower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_tolower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:50:54 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:50:56 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_tolower(int c) 16 | { 17 | return (ft_isupper(c) ? c + 32 : c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/misc/ft_toupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_toupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:51:04 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:51:05 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_toupper(int c) 16 | { 17 | return (ft_islower(c) ? c - 32 : c); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/output/ft_putchar_fd.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putchar_fd.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/04 17:22:51 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/04 17:22:53 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | void ft_putchar_fd(char c, int fd) 16 | { 17 | write(fd, &c, 1); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isalnum.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isalnum.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 19:56:54 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 19:56:54 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isalnum(int c) 16 | { 17 | return (ft_isalpha(c) || ft_isdigit(c)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_isgraph.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isgraph.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/14 14:33:26 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/14 14:37:35 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isgraph(int c) 16 | { 17 | return (ft_isprint(c) && !ft_isblank(c)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/memartin/libft/ft_isdigit.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isdigit.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: memartin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2020/02/04 18:15:56 by memartin #+# #+# */ 9 | /* Updated: 2020/02/17 15:41:31 by memartin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_isdigit(int c) 14 | { 15 | if ('0' <= c && '9' >= c) 16 | return (1); 17 | else 18 | return (0); 19 | } 20 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/misc/ft_intswap.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_intswap.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/09 19:12:36 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/09 19:12:38 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | void ft_intswap(int *a, int *b) 14 | { 15 | int tmp; 16 | 17 | tmp = *a; 18 | *a = *b; 19 | *b = tmp; 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/string/ft_striter.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_striter.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/04 17:18:15 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/04 17:18:16 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | void ft_striter(char *s, void (*f)(char *)) 14 | { 15 | if (s && f) 16 | while (*s) 17 | f(s++); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putendl.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putendl.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 19:51:01 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 19:51:04 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putendl(char const *s) 16 | { 17 | ft_putstr(s); 18 | ft_putchar('\n'); 19 | } 20 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putstr_fd.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putstr_fd.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/13 17:00:02 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/13 17:00:27 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putstr_fd(char const *s, int fd) 16 | { 17 | write(fd, s, ft_strlen(s)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_striter.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_striter.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/24 07:38:52 by juligonz #+# #+# */ 9 | /* Updated: 2019/08/24 07:45:01 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_striter(char *s, void (*f)(char *)) 16 | { 17 | while (*s) 18 | f(s++); 19 | } 20 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_isascii.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isascii.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:52:38 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/09 11:03:32 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isascii(int c) 16 | { 17 | if (c >= 0 && c < 128) 18 | return (1); 19 | return (0); 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_isdigit.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isdigit.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:52:38 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/09 11:03:50 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isdigit(int c) 16 | { 17 | if (c > 47 && c < 58) 18 | return (1); 19 | return (0); 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_islower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_islower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:52:38 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/09 11:03:51 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_islower(int c) 16 | { 17 | if (c > 96 && c < 123) 18 | return (1); 19 | return (0); 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_isprint.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isprint.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:52:38 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/09 11:03:52 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isprint(int c) 16 | { 17 | if (c > 31 && c < 127) 18 | return (1); 19 | return (0); 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_isupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 15:52:38 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/09 11:03:53 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isupper(int c) 16 | { 17 | if (c > 64 && c < 91) 18 | return (1); 19 | return (0); 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_tolower.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_tolower.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 17:14:27 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/07 17:18:10 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_tolower(int c) 16 | { 17 | if (c > 64 && c < 91) 18 | c += 32; 19 | return (c); 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hbaudet/libft/ft_toupper.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_toupper.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hbaudet +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/10/07 17:14:27 by hbaudet #+# #+# */ 9 | /* Updated: 2019/10/07 17:17:08 by hbaudet ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_toupper(int c) 16 | { 17 | if (c > 96 && c < 123) 18 | c -= 32; 19 | return (c); 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_isalnum.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isalnum.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:51:47 by hben-yah #+# #+# */ 9 | /* Updated: 2019/05/22 09:42:02 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isalnum(int c) 16 | { 17 | return (ft_isalpha(c) || ft_isdigit(c)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/boolean/ft_isalpha.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_isalpha.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/03 17:37:08 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/03 17:37:10 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | int ft_isalpha(int c) 16 | { 17 | return (ft_isupper(c) || ft_islower(c)); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/misc/ft_charswap.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_charswap.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/09 12:37:38 by hben-yah #+# #+# */ 9 | /* Updated: 2018/04/09 12:37:45 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | void ft_charswap(char *a, char *b) 14 | { 15 | char tmp; 16 | 17 | tmp = *a; 18 | *a = *b; 19 | *b = tmp; 20 | } 21 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/mchardin/libft/is/ft_iswhitespace.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_iswhitespace.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: mchardin +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2020/02/02 11:15:46 by mchardin #+# #+# */ 9 | /* Updated: 2020/02/02 11:16:06 by mchardin ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_iswhitespace(char c) 14 | { 15 | if (c == ' ' || (c >= 9 && c <= 13)) 16 | return (1); 17 | return (0); 18 | } 19 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/hben-yah/libft/srcs/output/ft_putstrtab.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putstrtab.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: hben-yah +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/04/09 18:53:38 by hben-yah #+# #+# */ 9 | /* Updated: 2019/03/16 11:36:06 by hben-yah ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putstrtab(char **tab) 16 | { 17 | while (*tab) 18 | ft_putendl(*(tab++)); 19 | } 20 | -------------------------------------------------------------------------------- /battlespace/rendus/jun2020/juligonz/lib/libft/ft_putnbr_base.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_putnbr_base.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: juligonz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2019/08/14 16:51:11 by juligonz #+# #+# */ 9 | /* Updated: 2019/10/08 09:05:46 by juligonz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include "libft.h" 14 | 15 | void ft_putnbr_base(int n, unsigned int base) 16 | { 17 | ft_putnbr_base_fd(n, base, 1); 18 | } 19 | --------------------------------------------------------------------------------