Aaron's Independent Study

From Earlham Cluster Department

(Difference between revisions)
Jump to: navigation, search
(classes)
(Member variables)
Line 48: Line 48:
=== Member variables ===
=== Member variables ===
* I follow the convention of putting an underscore (_) at the beginning of private member variable names to help distinguish them from local or public variables.
* I follow the convention of putting an underscore (_) at the beginning of private member variable names to help distinguish them from local or public variables.
-
* Each member variable should be given an accessor (a constant member function that just returns the variable) and a mutator (which assigns the variable the value passed by a parameter), except for vectors and classes.  Vectors should have an accessor that takes a size_t and returns the element at that position in the vector)
 
-
* If a member variable is to be changed, I always do it with a mutator, never directly (e.g. set_value(1); rather than _value = 1;)
 
-
* If a member variable is to be used, I always do it with an accessor, never directly (e.g. new_val = value(); rather than new_val = _value;
 
=== Global constants ===
=== Global constants ===

Revision as of 19:55, 1 April 2010

For my senior project I have been developing an educational computer game to teach digital logic, specifically the interactions of logical switches and gates. The working title is "Computer City: Sewers," since the game takes place in the lowest level of a city ( corresponding to digital logic, which is conceptually the lowest level of the computer architecture ). The game is puzzle-based and is written in C++ with the OpenGL API.

The game's source is available at http://github.com/amweeden06/SRSem-Project-2009/tree/master/Source/

I welcome any contributions to my project. See the directions below for instructions on how to do so, and my suggestions for adding to the game. Any questions, send email to amweeden06 at earlham dot edu .


Contents

Contributing to the project

Getting Started

github is the source code control of choice for this project. Below are the instructions for downloading the source code from github:

  1. Set up an account at github (it's free)
  2. Let me know your username once you have created an account so I can add you to the contributors list (send email to amweeden06 at earlham dot edu)
  3. On a shell, type the following:
$ mkdir Sewers
$ cd Sewers
$ git init
$ git config user.name <your git username>
$ git config user.email <your email>
$ git remote add origin git@github.com:amweeden06/SRSem-Project-2009.git
$ git pull origin master
$ cd Source/ACL
  1. You should now be in the directory with the source code. To build, type
$ make
  1. This will make an executable called Sewers. To run, type
$ ./Sewers

Playing

Key commands

Notes on style

The following are stylistic conventions that I would ask you to conform to as you make changes to the program. This will help improve overall readability. Any questions, comments, or suggestions with regard to style decisions can certainly be directed to me via email (amweeden06 at earlham dot edu).

Variable names

classes

Member variables

Global constants

Const member functions

Indenting, whitespace, and bracing

int main()
{
...
}

Comments

Personal tools
Namespaces
Variants
Actions
websites
wiki
this semester
Toolbox