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 writer’s language is to some degree the product of his own action; he is both the historian and the agent of his own language.
    Paul De Man (1919–1983)