Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Simple Game of Life Application written in Objective-C using Cocoa
Branch: master

Functional changes:

1. Initial cell state at launch is now randomized.
2. Timer now uses positive values, in frames per second (values from 0.2 to 60.0, i.e. 5 seconds to 1/60th second).
3. Now uses NSTimeInterval rather than int to store update interval in object and preferences.
4. Now uses a single 2d array of cells rather than reallocating every time. Updates now store index paths for cells to toggle, then uses those index paths to perform toggle after cell enumeration is complete.
5. Fixed memory leaks (was using [row addObject: [[Cell alloc] init]]).
6. Implemented dealloc methods where required.
7. Cell's 'alive' property is now declared nonatomic to avoid an unnecessary lock.
8. Changed some int member variables to use NSInteger or NSUInteger.
Pedantic changes:
1. Switched 'bool' to 'BOOL'.
2. Removed some unnecessary caching of values as local variables (e.g. [NSUserDefaults standardUserDefaults]).
3. Stores user defaults using convenience methods for integer, float, and double.
4. Controller is set as application delegate in the nib file, not in -awakeFromNib.
5. Updated to use ObjC 2 property accessor syntax in various places.
6. Implemented pause: action method. play: and pause: set their sender's action to the opposite function upon invocation.
Something went wrong with that request. Please try again.