Grog-Knight

some game in C++
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/Grog-Knight

commit 5cd5d01247f5337d9c0b4be2e26acbba8a6c3f85
parent 0a22030686500bafd7cccb33942c273a33444445
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 10 Feb 2015 12:40:25 +0100

Doc(Readme), Doc(Contributing):

Add some rules to the contributing file
Make a proper Readme

Diffstat:
MContributing.md | 41+++++++++++++++++++++++++++++++++++++++--
MREADME.md | 10++++++++--
2 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/Contributing.md b/Contributing.md @@ -28,7 +28,7 @@ if (TRUE) { For function's name, go with the Javascript Naming rules: ```cpp -void MyAwesomeFunction(void) { +void myAwesomeFunction(void) { /* Some code */ } ``` @@ -36,7 +36,7 @@ void MyAwesomeFunction(void) { For a class file, respect the Javascript naming rules (^) `MyClassName.cpp` -`MyClassName.hpp` +`CyClassName.hpp` Of course, the name of the class file must the respect the name of the class itself. @@ -48,6 +48,43 @@ For a main, or outside-class functions, the Unix convention. > > Seem's like a little complicated, but we can actually make the difference betweeen class and functions with a ls. +### Class + +##### Headers + +A header file __must have__ a protection against infinite inclusion: +```cpp +#ifdef __CLASS__ +# define __CLASS__ +/* Header's code */ +#endif +``` + +Also, for a class, please the respect this template: + +```cpp +class MyClass { + // Public first + public: + /* Constructors and Destructors */ + MyClass(); + ... + + /* Functions */ + void makeSomeStuff(void); + ... + + /* Variables */ + int n; + ... + + // Then, private, same order as public. + private: + ... +}; +``` +The order is this one: public, protected, private. + ### Comments diff --git a/README.md b/README.md @@ -1,2 +1,8 @@ -# God this markdown is awesome -gitgud +# Rogue-Like + +Authors: + +Vincent Rey (N0ich) <vin100.rey@gmail.com> +Louis Solofrizzo (Ne02ptzero) <louis@ne02ptzero.me> + +[Contributing](Contributing.md)