Notes
- •Items that appear in this list are not optional, they are fully required.
Things To Not Do (MANDATORY)
- •Unwrap: Unwrap should not be used anywhere outside of test code.
- •Magic Numbers: Unless it is very clear what a number refers to, put it in a constant/variable/enum/etc
- •Hardcoded Values: Wherever possible, derive values instead of hardcoding them.
- •Race Conditions: Make sure new race conditions are not introduced. If things must run in a certain order than run them in that order. Do not rely upon async code where you need to introduce guard clauses.
- •Comments: Comments are unnecessary and should not be used outside of test code, unless they explain a complex piece of code or code where the meaning / reason is not immediately obvious.
- •Couple UI and Game Logic: Game and UI logic must be kept totally separate. UI should focus almost entirely on rendering.
Things To Do (MANDATORY)
- •Declarative Style: Wherever possible favor a declarative style over an imperative one.
- •Abstract: If it is possible abstract code to make it more readable, modular, and composable.
- •Pure Functions: Functions should be kept pure with minimal side effects wherever possible.
- •ECS: Use an ECS wherever possible. Do not use global state outside of the ECS system.
- •UPDATE OUT OF SCOPE: If you notice a styleguide issue, even if its not in scope of your ticket, fix it regardless. Commit the changes so they are easy to find.