Skip to content

Commit

Permalink
doc: Enhance documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gav authored and MicheleMichetti committed Mar 9, 2024
1 parent 1554211 commit f0edcdc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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```
29 changes: 29 additions & 0 deletions documentation/CODE_STYLE.md
Original file line number Diff line number Diff line change
@@ -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<TableInfo>* pool_; // OK.
};

struct UrlTableProperties { // OK - PascalCase
std::string name;
int num_entries;
static Pool<UrlTableProperties>* pool;
};
```
### Function naming
```cpp
AddTableEntry() // OK - PascalCase
DeleteUrl() // OK - PascalCase
OpenFileOrDie() // OK - PascalCase
```
12 changes: 12 additions & 0 deletions documentation/DOCKER.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit f0edcdc

Please sign in to comment.