uhhh ushsush
- x - the x coord that the piece starts at
- y - the y coord that the piece starts at
- xoffset - the amount that the x coord gets offset to
- yoffset - the amount that the y coord gets offset to
- xtemp - x + xoffset
- ytemp - y + yoffset
- xy - 'x'+x+'y'+y
- xyoff - 'x'+xtemp+'y'+ytemp
- undefined - nothing, absolutely nothing
- cancelMove - boolean that defines whether the script gets stopped
list:
- up - increments yoffset
- down - decrements yoffset
- left - decrements xoffset
- right - increments xoffset
- noSameColor - sets cancelMove to true if coordscolor[xyoff] == coordscolor[xy]
- noPiece - sets cancelMove to true if coords[xyoff] != undefined
- noPieceExSelf - same as above except it doesnt stop the script if coords[xyoff] == coords[xy]
goto - long
sets the index to the second number after it if the first isnt 0 and decrements the first one (e.g. ['goto', 5, 2] = continues at index 2 and can be executed 5 times total) setting the first number effectively makes it be able to run an infinite number of times, the second number can be excluded to continue at index 0
- isInBounds - checks if xyoff is in bounds and sets cancelMove to true if it isnt, useful if you want to use ['goto', -1] without freezing the page
- if (coming soon) - if the code after it would stop the script then it remembers that it would
then (part of if (coming soon)) a bit long
- undoes the behavior change of if and executes and only executes the code after it (up until an 'end' command) if cancelMove is false
- end - defines the end of some commands
- setvar (coming soon) - sets variables similarly to how JavaScript does it, variables MUST be prefixed with 'var.' (e.g. ['setvar', 'var.test', '=', 6, '+', 9, 'end']
- varcheck (coming soon) - does javascript comparison things and sets cancelMove to true if it returns false (e.g. ['varcheck' 'var.test', '==', 6, '+', 9, 'end'])
- saveMove - saves the move to be playable as soon as the program is done validating the moves