title: How to check value of randomly generated sprite in Andengine
body: <p>My code goes something like this:</p>
  
  <pre><code>while(x&lt;30)
   {
    int randomvalue= generaterandomnumber();
    Sprite backgroundSprite = new Sprite(location[coordx], location[coordy], spritetobegenerated[randomvalue-1].deepCopy(),getVertexBufferObjectManager())
    (Touchevents)
    x++;
    }
  </code></pre>
  
  <p>The sprites are saved in an array of sprites named spritetobegenerated[].</p>
  
  <p>Since the code generates these sprites randomly, I need some way to know which sprite is involved when a touch event occurs.</p>