place chips on the table

Asked by Neja

I have 5 chips and the game table. Test is the following: click on a chip - click on a number on the game table, click on another chip - click on another number on the table. The script should place all 5 chips onto the game table. I tried the following code

chips = [chip1.png, chip2.png, chip3.png, chip4.png]
numbers= [number1.png, number2.png, number3.png, number4.png]

for chip in chips:
       for number in numbers:
              click(chip)
              click(number)

Sikuli placed the first chip from the list only.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

if you want to place each chip on a different number (the example has only 4):

for i in range(len(chips)):
    click(chips[i])
    click(numbers[i])

Revision history for this message
Neja (keja04) said :
#2

thank you