test

Dependencies:   mbed FXOS8700CQ

Revision:
3:31ff7b3e2005
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/life/life.cpp	Fri May 15 20:32:27 2020 +0000
@@ -0,0 +1,28 @@
+#include "life.h"
+
+void life::init(){
+    lives = 3;
+    int d[56] = {
+        0,1,1,0,0,1,1,0,
+        1,1,1,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};
+    }
+}
+void life::update(){
+    lives=lives-1;
+    
+}
+void life::display(N5110 &lcd){
+    for(int i = 0; i < _num; i++){
+        int x = 0 + 8*i;
+        Bitmap p(icon, 7, 8);
+        p.render(lcd, x, 0);
+    }
+}
+
+int life::liferest(){return _num;}
+