SpeedPellet CreateSpeedPellet() { speedPellet = new SpeedPellet(); speedPellet.graphics = graphics; speedPellet.textures.Add("normal", Content.Load<Texture2D>("speedPellet")); speedPellet.currentTexture = speedPellet.textures["normal"]; speedPellet.setBoundaries(); do { speedPellet.SetStartPosition(); } while (!SpeedPelletIsOnField(speedPellet.position, speedPellet.currentTexture, textureCollisionMap)); return (SpeedPellet)speedPellet; }