Closed GoogleCodeExporter closed 9 years ago
You'll have to read the code for reset() to see why that is a bad idea (tm).
Basically, the first thing reset() does is clear out everything, including any
queued moves that might be part of the reset itself.
That's going to cause trouble.
Maybe what you want instead of reset() is:
clear()
home()
?
Original comment by miss...@hotmail.com
on 14 Jun 2010 at 1:21
Maybe pynguin.reset() should be separated from the full-on whole system reset.
When you run reset() as part of a script, what exactly are you hoping will be
reset?
Original comment by miss...@hotmail.com
on 15 Jun 2010 at 7:58
Usually, people are just trying to:
"""
clear()
goto(0,0)
turnto(0)
"""
pynguin.reset() separated out would be pretty nice (especially if you can clear
only what a pynguin has drawn, though that might be annoying. . .)
Original comment by aresnick...@gmail.com
on 15 Jun 2010 at 9:03
> clear()
> goto(0,0)
> turnto(0)
Ok. I will think of a way to separate out that functionality. I think reset()
is good name for bringing the pynguin back to its initial state.
I think I would add to that list:
pendown()
nofill()
width(2)
color('white')
fillcolor(100, 220, 110) # the default
fillrule('winding')
Any objection to those?
I think if someone wants different settings, they could create their own
function that sets things up the way they want ...
def reset2():
reset()
color('black')
fill(color='white')
or whatever...
What would be a good name for completely resetting the workspace? (back to 1
fresh pynguin, fully cleared screen, etc...) Maybe
full_reset() or
reset(full=True)
restart() or
refresh() or
...
?
> especially if you can clear only what a pynguin has drawn
pynguin.clear() should only remove what that one pynguin has drawn. Anything
drawn by another pynguin should be unaffected. Or am I misunderstanding what
you need?
Original comment by miss...@hotmail.com
on 15 Jun 2010 at 11:24
> I think I would add to that list:
>
> pendown()
> nofill()
> width(2)
> color('white')
> fillcolor(100, 220, 110) # the default
> fillrule('winding')
>
>Any objection to those?
Sounds good to me--I've run into some issues that require me to penup/pendown
to get the penguin drawing again. That said, the right strategy is to probably
just address those issues? I'll keep my eye out.
> What would be a good name for completely resetting the workspace? (back to 1
fresh pynguin, fully cleared screen, etc...) Maybe
>
> full_reset() or
> reset(full=True)
> restart() or
> refresh() or
> ...
> ?
full_reset, reset(full=True) sound good to me.
> pynguin.clear() should only remove what that one pynguin has drawn. Anything
drawn by another pynguin should be unaffected. Or am I misunderstanding what
you need?
Nope, sounds great!
Thanks!
Original comment by aresnick...@gmail.com
on 15 Jun 2010 at 11:31
>> pynguin.clear() should only remove what that one pynguin has drawn.
> sounds great!
Sorry. What I meant is: it already works like that (at least it should).
If not, please file a separate issue.
Original comment by miss...@hotmail.com
on 16 Jun 2010 at 12:20
This issue was closed by revision 26633a9bf2.
Original comment by miss...@hotmail.com
on 1 Jul 2010 at 4:17
Original issue reported on code.google.com by
aresnick...@gmail.com
on 13 Jun 2010 at 11:00