The user may use 2 commands:
move black
(or)
move
So the 'black' part is optional.
I know that the user input is confined to 50 characters top, so I can use scanf()
to read each string by itself.
However, I cannot use 3 times scanf()
as for the second option - there will be an error (I think ..).
Is there a function that allows me to read and if there's no input it will inform that?
Is gets (or fgets) an appropriate one? (remember thaat the line is no longer than 50 characters).