BTA - A Better Turtle API

Started by informer, Feb 14, 2019, 02:37 am

Previous topic - Next topic

informer

Feb 14, 2019, 02:37 am Last Edit: Feb 15, 2019, 02:05 am by informer
After a decent amount of revision I'm going to release my turtle API to the public. It's pretty well commented so there shouldn't be much issue understanding it if you read through the code.

A caveat: I use gps for most if not all functions, I'll think about adding a way to keep your location with out it if people desire it.

Here is a quick rundown of the features added:
    Functions:
        calibrate() to the cardinal directions
        boxTo(destinationVector[, fn]) moves to every location between two coordinates
        goTo(vector[, fn]) moves the turtle to a specific vector
        move(direction[, fn][, count]) multiple times, foward-back-up-down
        refuel() checks inventory for fuel
        xMovement(distance[, fn]) moves the turtle along the x-axis
        yMovement(distance[, fn]) moves the turtle along the y-axis
        zMovement(distance[, fn]) moves the turtle along the z-axis
    Internal packages:
        turn.
            north(), south, (etc..) face the four cardinal directions
            spin(direction[, count]) multiple times
            toCardinal(str) face cardinal direction by user input
            getDirection() get current direction as a string value

Code Select
pastebin get MdD051uF bta
pastebin