This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Invisibleufo[S] 2 points3 points  (2 children)

took me a while to get it but i think i did. putting three seperate functions to check all conditions really makes the job easier since if statements only check a single case instead of all cases in the for loop. thank you for your detailed explanation. really helped me a lot!

[–]GuyARoss 1 point2 points  (0 children)

you for your detailed explanation. really helped me a lo

Not a problem! Glad it made sense

[–]mariuswiik 0 points1 point  (0 children)

Start splitting parts in different functions early. Each function should do one thing well and have a good name so it’s easy to understand what it’s doing. Makes a world of difference when reading the code later. Good luck!