move position with key input and setting color in C