Turtle Roy translated to Javascript