Making things more complicated

The case you're looking for would look something like this:

  1. for i in xrange(30):
  2. if features.caughtBall:
  3. yield 'stand'
  4. break
  5. else:
  6. yield command

I don't have an example of "real" code to show yet. As I said above, I've not started to try reimplementing all our old behaviors in the new system, but there's no technical reason why this approach won't work. Perhaps I'll make another post when I have something more complex ready.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockcode>
  • Lines and paragraphs break automatically.
  • You may post block code using <blockcode [type="language"]>...</blockcode> tags.
More information about formatting options