sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #14837
Re: [Question #215515]: Puzzle slolver
Question #215515 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/215515
Status: Open => Answered
RaiMan proposed the following answer:
Yes, the basic is a Python list (as mutable arrays are called in Python)
import random
puzzle = [ [ ], [ ], [ ], [ ], [ ], [ ] ] # empty list
# fill with random values
for row in range(6):
for col in range(6):
puzzle[row][col].append(random.randint(1, 6))
then it would be a good idea, to define some basic def()'s for the basic
searches and moves.
have look here http://docs.python.org/2/tutorial/datastructures.html
for some helpful functions that can be used with lists (besides looping through them ;-)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.