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:

    Strange goings on! Jones did it slowly, deliberately, in the bathroom, with a knife, at midnight. What he did was butter a piece of toast. We are too familiar with the language of action to notice at first an anomaly: the ‘it’ of ‘Jones did it slowly, deliberately,...’ seems to refer to some entity, presumably an action, that is then characterized in a number of ways.
    Donald Davidson (b. 1917)