Card game (random move problem)

[FONT=Times New Roman]Hello,

I am creating a 1 (human) vs 1 (AI) mini card game in a full game. I’m a beginner and I’ve been struggling for 2 weeks on a simple thing (I think). I’ll try to explain this to you as best as possible … So here is my problem:

[FONT=Times New Roman]Function:
[FONT=Times New Roman]- Touch movement for the human player
[FONT=Times New Roman]- Move & random choice for AI (my problem)
[FONT=Times New Roman]- 5 cards per player and 9 slots

[FONT=Times New Roman]Method (I don’t know if it’s the right one …):
[FONT=Times New Roman]Creation of two card lists for player 1 and AI, creation of a location list Each time you move to a location, it is removed from the list so that it cannot be used any more, the same for cards.

[FONT=Courier New]Steps :
[FONT=Courier New]Player 1 plays:
[FONT=Courier New]- The player clicks on the map then on the location, the map moves (ok)
[FONT=Courier New]- Deletion of the location (normally it works)

[FONT=Courier New]AI plays:
[FONT=Courier New]- Choice of a random card in the deck
[FONT=Courier New]- Choice of a free and random location
[FONT=Courier New]- Move the selected card to the selected empty slot

[FONT=Courier New]My problem (s) is as follows:
[FONT=Courier New]- AI cards do not always move after the human player step
[FONT=Courier New]- One or more cards do not move in the game
[FONT=Courier New]- Some cards move from one location to another (on the board)
[FONT=Courier New]- Some AI cards move to an already used location

[FONT=Courier New]See attached the BP of AI…

[FONT=Courier New]Thank you in advance for your precious help …