tolgaatam / ColabTurtle

An HTML based Turtle implementation, in order to work in Google Colab
MIT License
55 stars 30 forks source link

color and bgcolor currently broke (incomplete?) #7

Closed bdklahn closed 3 years ago

bdklahn commented 3 years ago

I pulled the repo locally, was trying things out in a Jupyter Lab session, and got some errors.

It looks like bgcolor needs to include the c2 and c3 params. https://github.com/tolgaatam/ColabTurtle/blob/8333d89e9922cbb7633319a0db68e8732da31170/ColabTurtle/Turtle.py#L357

I think both those functions need it to be 'c3' before the 'raise'. e.g. https://github.com/tolgaatam/ColabTurtle/blob/8333d89e9922cbb7633319a0db68e8732da31170/ColabTurtle/Turtle.py#L363

tolgaatam commented 3 years ago

Upon your issue, I quickly applied a fix. Can you recheck?

bdklahn commented 3 years ago

Ok. I also just realized it doesn't seem to handle the case where ONLY the first argument is set.

Also, I guess I never noted that "None" should be be the default, if nothing is entered for default function args. So I guess you wouldn't need to explicitly put those in. But it never hurts to be explicit, for documenting.

tolgaatam commented 3 years ago

Yes, if the first parameter is not a string or tuple, it does not give any error but silently fail. I fixed that now as well

bdklahn commented 3 years ago

Seems to work now.

tolgaatam commented 3 years ago

If that fits you, i can close this issue now. We can proceed with the other issues.