Difference between revisions of "Code Size/Cheat sheet"
m (minor changes) |
RednaxelaBot (talk | contribs) m (Using <syntaxhighlight>.) |
||
Line 16: | Line 16: | ||
|- | |- | ||
|style="padding: 0"| | |style="padding: 0"| | ||
− | < | + | <syntaxhighlight> |
class Robot | class Robot | ||
extends AdvancedRobot | extends AdvancedRobot | ||
Line 45: | Line 45: | ||
} | } | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
| | | | ||
− | < | + | <syntaxhighlight> |
class Robot | class Robot | ||
extends AdvancedRobot | extends AdvancedRobot | ||
Line 76: | Line 76: | ||
} | } | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
<!-- | <!-- | ||
The code is very ugly, agree? | The code is very ugly, agree? | ||
Line 90: | Line 90: | ||
Do this: | Do this: | ||
− | < | + | <syntaxhighlight> |
public void onScannedRobot(ScannedRobotEvent e) { | public void onScannedRobot(ScannedRobotEvent e) { | ||
int int_variable_if_you_want; | int int_variable_if_you_want; | ||
Line 98: | Line 98: | ||
// ... | // ... | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
Don't do this: | Don't do this: | ||
− | < | + | <syntaxhighlight> |
public void onScannedRobot(ScannedRobotEvent e) { | public void onScannedRobot(ScannedRobotEvent e) { | ||
double distance = e.getDistance(); | double distance = e.getDistance(); | ||
Line 108: | Line 108: | ||
// ... | // ... | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
|} | |} | ||
| style="width: 40%; vertical-align:top;" | | | style="width: 40%; vertical-align:top;" | |
Revision as of 09:22, 1 July 2010
This article is a stub. You can help RoboWiki by expanding it. |
Code Size Cheat sheet
|
|