Benutzer-Werkzeuge

Webseiten-Werkzeuge


spielplatz:student:42:cpisine_rush1

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
spielplatz:student:42:cpisine_rush1 [2026/02/14 14:08] – [Functiondefinition] itbsspielplatz:student:42:cpisine_rush1 [2026/02/14 19:29] (aktuell) – [Functiondefinition] itbs
Zeile 1: Zeile 1:
 +====== Rush 01 with 3D Boxes ======
 +
 +  - Messagees for the User handeld in Main
 +  - call function with first String (to validate Numberset)
 +    - If not correct abort to Main return (1);
 +  - function for loop and split the input by spaces
 +    - function that read Characters and see it as Digit 
 +      - (or – Recursive /10 %10 for grater then Zero as positiv unsigned int)
 +  - can we validate the Arraysize default 4x4x4Grid and SetSitzeFunc
 +    - optional (3. map sizes up to 9x9)
 +    - create int box3dmatrix[][][] and call next step
 +  - startsolve(int box3dmatrix[][][]) 
 +    - easy Checks 
 +    - loop through the Matrix to validate all Inputs 
 +      - only solution is full validate call next
 +  - loop through the Matrix and write the Input Digits to the Terminal
 +    - back to main with return (0);  
 +
 +==== validated Ouput to the User ====
 +<code>
 +./rush01 "4 3 2 1 1 2 2 2 4 3 2 1 1 2 2 2" | cat -e
 +1 2 3 4$
 +2 3 4 1$
 +3 4 1 2$
 +4 1 2 3$
 +</code>
 +
 +==== Error Ouput to the User ====
 +
 +  * not just one Inputstring
 +    * "Run with only one argument in double \" quotation !!\n"
 +  * no parameter or to many
 +    * "run ./rush01 \"4 3 2 1 1 2 2 2 4 3 2 1 1 2 2 2\"\n" 
 +  * Validate and Solve Error (no Solution output)
 +    * "Error in given Data. 4x4 Grid please!\n"
 +  * 2D Terminal output try to reuse the "loop through the Matrix"
 +
 +==== Functiondefinition ====
 +
 +helper func
 +  * ''unsigned int digit2int(char character);''
 +  * ''char       * int2chars(unsigned int value);''
 +  * ''int     ft_putnbr(int nb); or digit_to_int;''
 +
 +  - ''int     runcode(char *list_of_digits);''
 +  - ''int     check_numbers(?);'' call func to convert and check >0 set Arraysize
 +  - ''void    create_3d_matrix(int size, int ***matrix );''
 +  - ''int     easyvalidate(int matrix[][][]);''
 +  - ''int     more_logic_checks(int matrix[][][]);''
 +  - ''int     is_now_validated(int matrix[][][]);''
 +  - ''void    printout2dterminal(int matrix[][][]); return 0;''
 + 
 +
 +
 +
 +[[spielplatz:student:42:rusg1|]]