Yuheng Huo / Mbed 2 deprecated hyh_copy

Dependencies:   mbed FXOS8700CQ

Revision:
2:cc9d8ec2e1f4
Parent:
1:48b0bf0bcda8
--- a/life.cpp	Fri May 15 12:32:47 2020 +0000
+++ b/life.cpp	Fri May 15 17:44:25 2020 +0000
@@ -3,20 +3,20 @@
 void life::init(){
     _x = 0;
     _y = 0;
-    _num = 4;
+    _num = 3;
     _width = 8;
     _height = 7;
     int d[56] = {
         0,1,1,0,0,1,1,0,
         1,1,1,1,1,1,1,1,
-        1,1,0,0,1,1,1,1,
-        1,1,0,1,1,1,1,1,
+        1,1,1,1,1,1,1,1,
+        1,1,1,1,1,1,1,1,
         0,1,1,1,1,1,1,0,
         0,0,1,1,1,1,0,0,
         0,0,0,1,1,0,0,0
     };
     for(int i = 0; i < 56; i++){
-        data[i] = d[i];
+        icon[i] = d[i];
     }
 }
 void life::update(){
@@ -27,7 +27,7 @@
         int x = _x + _width*i;
         unsigned int width = _width;
         unsigned int height = _height;
-        Bitmap p(data, height, width);
+        Bitmap p(icon, height, width);
         p.render(lcd, x, _y);
     }
 }