← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #239460]: How to build a game bot that selects action based on current images

 

Question #239460 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/239460

    Status: Open => Answered

RaiMan proposed the following answer:
Of course you can add loops as you like on same level (consecutive) or
nested (mind Python indentation).

The challenge is to keep the stuff clear:
- a loop should only have max 2 indent levels
- longer blocks should be delegated to functions (with the chance, to reuse code) (which again might have nested loops)
- important images should be assigned to "speaking" variables 

For the overall workflow it makes sense, to think top-down and simply
start with a framework of comments accordingly indented.

Some of the faqs are about basic Python and Sikuli concepts.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.