Card arrangement

Hi guys, i have a problem. I have several cards in my hand, when a take one off the others must move one position to the left, anyone know any algorithm for this situation?

21571-3.jpg

21572-5.jpg

Just get the transform.position.x of the card that you are moving down. Then run a foreach statement to cycle through the array of cards and any card in the array that has a transform.position.x that is higher than the card that you moved has to move one space to the left with an immediate jump by just assigning a new transform.position or a nice even slide by using Lerp or Translate if you don’t care about acceleration/deceleration …

Hope that helps. If you don’t understand something, let me know and I can give more details