When hacking on edgequest to submit a PR, please make sure your contribution meets the following criteria, otherwise your PR will be denied (but most likely someone will request that you update your code to reflect this guide).
- Two space indentation
- Double quotes for all strings
- Single quotes for all characters
- Docstrings on public interfaces mandatory
- Line comments preferred, even for large paragraphs
- Must comment tricky parts of the code, the more comments the better
- If you do not know whether something is tricky to others, comment it anyway
- Opening braces on same line
- Semicolons after return statements
- Match statements need braces for multi line match arms, single lines not as much
- If it increases readability to add braces for match arms, do it
- No trailing commas (On struct fields, json files, etc)
- Follow this
- Only short names allowed are things like
x
,y
,tx
,ty
,w
,h
,pos
,me
,con
,bg
,fg
,dun
,rng
- If it's short it must be descriptive like
cat
- Try not to abbreviate long words
- If it's short it must be descriptive like
x
- x coordinatey
- y coordinatetx
- target x coordinate (AIs use this to set locations where they want to move to)ty
- target y coordinate AIs use this to set locations where they want to move to)w
- widthh
- heightpos
-Pos
ition, or xy coordinate pairme
-AI
referring to it's own assigned creaturecon
- tcod consolebg
- background color (asRGB
or tuple)fg
- foreground color (asRGB
or tuple)dun
-Dungeon
objectrng
- Random number generator
- Avoid importing * or everything at once
- Follow this for import order