Stendhal code design: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann No edit summary |
imported>Kymara No edit summary |
||
| Line 1: | Line 1: | ||
{{Navigation for Stendhal Top|Developing}} |
{{Navigation for Stendhal Top|Developing}} |
||
{{Navigation for Stendhal Developers}} |
{{Navigation for Stendhal Developers}} |
||
== Stendhal Javadoc == |
|||
The a browsable javadoc is located at [http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc]. |
|||
== Finding your way around the Code == |
== Finding your way around the Code == |
||
Revision as of 17:57, 6 November 2010
Stendhal Javadoc
The a browsable javadoc is located at [1].
Finding your way around the Code
Coding Standards
The code is written to compile for sun java 1.5
We try to follow SUN Java code convention.
Despite this:
- We use tab for all indentation. (One tab is equivalent to 4 spaces for display purpose.)
- We do not stick too closely to line length.
- We always use blocks in if-statements and loops, even if the block only consists of one single statement:
if (condition) {
method();
}
Avoid evaluation and assignment in the same line like:
- ternary operators, for example in:
String y = x==null ? "NULL": x.toString();
- post-increment/decrement operators as in:
if (idx++ == 10) {
...
}