inexorabletash / jslogo

Logo in JavaScript

Home Page:https://calormen.com/jslogo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposal: multiple turtles

bojidar-bg opened this issue Β· comments

Sometimes it is fun to have multiple turtles draw on the screen. Especially when you feel like watching a turtle race πŸ˜ƒ .
It would be nice to support some of the commands from, e.g., FMS logo:

  • SETTURTLE n [ownPenSettings] - chooses which turtle should be running. Might have an optional parameter for whether the turtle should share its pen settings
  • TURTLE - returns the index of the current turtle
  • HASOWNPENP - returns whether the turtle has separate pen settings
  • TURTLES - returns the maximal index passed to setturtle since clearscreen. Effectively a count of how many turtles are in use
  • BITMAPTURTLE - makes the turtle stamp a bitmap, should be likely ignored for now.
  • NOBITMAPTURTLE - disables bitmapturtle, should be likely ignored for now.
  • SETTURTLEMODE mode - sets some drawing mode for the bitmap, such as XOR, should be likely ignored for now.
  • TURTLEMODE - getter for setturtlemode, should be likely ignored for now.
  • ASK n instructions - runs instructions as turtle n

Sounds like a good addition!

Hopefully you're thinking of implementing it since I won't get to it soon. If so, I really appreciate the proposal first. Happy to review changes.

Had a busy weeks month (because of fosdem and other things), and I would try doing something about it this or the next week πŸ˜ƒ