A sample of SFE's ColorLCDShield library demonstrating Conway's Game of Life

Dependencies:   ColorLCDShield mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Conway.h Source File

Conway.h

00001 #include <stdint.h>
00002 
00003 class Conway {
00004 public:
00005     uint8_t world[128][16];
00006     uint8_t worldTemp[128][16];
00007 
00008     void nextGeneration();
00009     void swap();
00010     
00011     void randomizeWorld(uint16_t seed);
00012     void randomizeWorld25(uint16_t seed);
00013     void randomizeWorld75(uint16_t seed);
00014     
00015 private:
00016     void initWorldTemp();
00017 };