Every shape can be moved in any direction by invoking the move
function with direction. For example, to move a shape named greeting
to the RIGHT
, the command we write is
greeting.move(RIGHT)
a general syntax for invoking move is
<name of shape>.move(<direction>)
The available directions in which the shape can be moved are
RIGHT
LEFT
UP
DOWN
To continuously move the greeting "Hello" to the right we write
shape greeting(text):
.text = "Hello"
.color = RED
.position = (100, 100)
endshape
loop
greeting.move(RIGHT)
endloop
Notice any errors or typos? Please let us know or feel free to edit move.md and issue a pull request.
Follow us on twitter @RevineLang
Built by Arpit Bhayani