Home

Awesome

turtle

This repository contains a trivial implementation of a turtle-graphics thing.

We've embedded a simple FORTH Interpreter and we use that to allow the user to run scripts to control the standard turtle.

Usage

Run the application with the path to a script:

  ./turtle ./foo.in

The generated output will be saved in turtle.png, and an animation will be saved alongside it as turtle.gif:

Rendered output of _examples/squares.4th:

Result

Animated output of _examples/squares.4th, showing how it was created:

Result Animated

You can find example scripts beneath _examples/

Words

The following words are defined in words.go (and connected to the interpreter in main.go):

Github Setup

This repository is configured to run tests upon every commit, and when pull-requests are created/updated. The testing is carried out via .github/run-tests.sh which is used by the github-action-tester action.