diff --git a/README.md b/README.md index e96f293..bdeef9b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ # Re-Pokemon-Red -# Running the game -- ```$ docker compose build``` -- ```$ docker compose run play``` +### Documentation index +- [Code style guidelines](./documentation/CODE_STYLE.md) +- [Building, running and testing with Docker](./documentation/DOCKER.md) -# Testing your changes -- ```$ docker compose build``` -- ```$ docker compose run test``` diff --git a/documentation/CODE_STYLE.md b/documentation/CODE_STYLE.md new file mode 100644 index 0000000..5857e22 --- /dev/null +++ b/documentation/CODE_STYLE.md @@ -0,0 +1,29 @@ +# Code style guidelines +### Variable naming: +```cpp +std::string table_name; // OK - snake_case. +std::string tableName; // Bad - cammelCase +``` + +### Class and struct naming: +```cpp +class TableInfo { // OK - PascalCase + ... + private: + std::string table_name_; // OK - snake_case underscore at end. + static Pool* pool_; // OK. +}; + +struct UrlTableProperties { // OK - PascalCase + std::string name; + int num_entries; + static Pool* pool; +}; +``` + +### Function naming +```cpp +AddTableEntry() // OK - PascalCase +DeleteUrl() // OK - PascalCase +OpenFileOrDie() // OK - PascalCase +``` \ No newline at end of file diff --git a/documentation/DOCKER.md b/documentation/DOCKER.md new file mode 100644 index 0000000..a6f02e8 --- /dev/null +++ b/documentation/DOCKER.md @@ -0,0 +1,12 @@ +# Docker +### Running the game +```bash +$ docker compose build +$ docker compose run play +``` + +### Testing your changes +```bash +$ docker compose build +$ docker compose run test +```