Implemented player switch management in game engine