Colobot - Language Overview

Language Overview

The programming language used in Colobot is C-BOT, syntactically similar to Java. Example code for a bot to find a piece of titanium ore and deliver it to a purification facility:

extern void object::FetchTitanium { object item; // declare variable item = radar(TitaniumOre); // find a piece of titanium ore goto(item.position); // go to the ore grab; // pick up whatever is in front of the robot (presumably the ore) item = radar(Converter); // find the ore converter goto(item.position); // relocate to the converter drop; // drop the piece of ore move(-2.5); // back up 2.5 meters to allow the converter to start processing the ore }

Read more about this topic:  Colobot

Famous quotes containing the word language:

    Now stamp the Lord’s Prayer on a grain of rice,
    A Bible-leaved of all the written woods
    Strip to this tree: a rocking alphabet,
    Genesis in the root, the scarecrow word,
    And one light’s language in the book of trees.
    Dylan Thomas (1914–1953)