change while-loop to for-loop for player A input

give three chances for valid input