changeCurrentPlayer function in game