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:

    The language of Friendship is not words, but meanings. It is an intelligence above language.
    Henry David Thoreau (1817–1862)