added the functionality to swtich between the computer and the human's turns