Skip to content

PTSnoop/Celluria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

//  CODE STYLE
//  - just making sure we're agreed on all this.

#include <things.h>

#define M_PI 3.141592 // global constants (like pi) in all caps, with underscores.

namespace game { // everything goes inside a big global namespace, called "game".

    enum DrawStyle { ALPHA, BETA, FLAT_SYSTEM }; // enums in same style as #defines

    class ClassName { // class names are capitalised, in CamelCase. 
    public:
        // functions and members start with a small letter, in camelCase.
        void draw (float) ;
        void drawSomethingElse (float) ;
        float parameter ;

    private:
        float somethingCompletelyDifferent ;
    }

    void ClassName::draw (float thing) { // curly brackets in line with the thing they're attached to.
        if (thing > 0.5) {
            cout << "Hello world!" << endl;
        } 
        else {
            cout << "Are you still there?..." << endl;
        }
    }

}

/*
  Something we've not decided on: indentation.
  So far, Simon's been using two spaces; I (PTSnoop)'ve tended to use four.
  We should decide on something...

  VOTES
    Actual tab tabs: 2
    Two spaces:      0.5
    Four spaces:     0.5


  VOTED SO FAR:
    PTSnoop
    Bloodlust80 (General Bloodlust)
    staircase27 I really don't like actual tabs for some reason! but don't mind how many spaces! :P

  ADDENDUM:
    Let's move this debate to somewhere more forum-flavoured. http://sector-alpha.net/forumdisplay.php?126-Celluria
*/

About

A city-building rts microbiology game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published