Conway's game of life - derived from another project, turned into a c++ class, and scaled to support up to a 480x272 display, or a lower resolution color display.

Dependents:   GameOfLife

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Wed Apr 23 11:42:10 2014 +0000
Parent:
1:9e88d16ab21e
Child:
3:860ae49fedb7
Commit message:
Revised documentation.

Changed in this revision

LifeRules.h Show annotated file Show diff for this revision Revisions of this file
--- a/LifeRules.h	Wed Apr 23 11:40:10 2014 +0000
+++ b/LifeRules.h	Wed Apr 23 11:42:10 2014 +0000
@@ -1,3 +1,12 @@
+#include "mbed.h"
+
+// Defined and Derived values to check if it exceeds available memory
+#define FRAMES_PER_BIT 2    /* current and next life cycle */
+
+//#if (LIFE_W * LIFE_H * BITS_PER_LIFE * FRAMES_PER_BIT / 8) > (BYTE_RSVD_RAM)
+//#error Bummer, can't make the lifemap that big
+//#endif
+
 /// Conway's game of life
 ///
 /// http://en.wikipedia.org/wiki/Conway's_Game_of_Life
@@ -13,16 +22,6 @@
 /// more animated when I had access to an 8008 micro and a "TV 
 /// typewriter" interface.
 ///
-#include "mbed.h"
-
-// Defined and Derived values to check if it exceeds available memory
-#define FRAMES_PER_BIT 2    /* current and next life cycle */
-
-//#if (LIFE_W * LIFE_H * BITS_PER_LIFE * FRAMES_PER_BIT / 8) > (BYTE_RSVD_RAM)
-//#error Bummer, can't make the lifemap that big
-//#endif
-
-
 class Life {
 public:
     typedef enum {