void Rotate() { angle = 0; targetAngle = targetAngle % 360; targetAngle = angle + (new Random()).Next(1, 1) * 90; substate = GameSubstate.Rotating; uiPlayer.StartRotate(); uiAIPlayer.StartRotate(); uiFood.StartRotate(); currentMazeDirection = (MoveDirection)(((int)currentMazeDirection + 1) % (int)MoveDirection.NIL); }