-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Inside the file minimax.c, on line 23, you have an else.
it is not needed for the flow of the function, and the function will work exactly the same if you delete the else line of the code, and lower the rest of the function by one indentation.
i.e.
if (something) {
return;
} else {
doSomethingElse();
}
is exactly the same as
if (something) {
return;
}
doSomethingElse();
This pattern is called "Early return", and it helps by making your function seem less complex by having less indentations and less if/else branching.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels