Adding Comments, small fix in mastermind.cpp

Added comments to the end of loops and functions.
Fixed Indentation.
In mastermind, fixed it so it checks if the guess and code index are the
same rather than checking if the secretCode and the guess at the guess
index are the same