How could I improve my code for this Mastermind clone? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

How could I improve my code for this Mastermind clone?

I'm struggling to think of any ways to write this in a better way, what would you suggest me to do? https://code.sololearn.com/cegIYyrNe4NV/?ref=app

25th Feb 2017, 8:01 AM
Lari Liuhamo
Lari Liuhamo - avatar
3 Antworten
+ 1
Those are all valid points, thanks.
29th Jun 2017, 12:30 PM
Lari Liuhamo
Lari Liuhamo - avatar
0
looking at a glance without looking at the algoritme: on line 64 and line 34 you have questionable if statements, maybe by modifying line 64 you could make 1 if statement and also the one on line 34 you could change so that you don't need continue. continue could almost always be avoided by refactoring your code, so that statement triggers me :) also, maybe it's sololearn, but i can't input a difficulty :( i get the exception message always
29th Jun 2017, 10:56 AM
Harm Zeinstra
Harm Zeinstra - avatar
0
just red your note on top :)
29th Jun 2017, 10:57 AM
Harm Zeinstra
Harm Zeinstra - avatar