Nemesis game, stats

Revision:
8:b8e8e2f335e1
Parent:
7:cae9a95427f7
Child:
9:b9ad5e45aebf
--- a/Stats.cpp	Thu Apr 06 09:38:22 2017 +0000
+++ b/Stats.cpp	Sun Apr 09 12:47:00 2017 +0000
@@ -12,7 +12,6 @@
 
 void Stats::draw_health(N5110 &lcd)
 {
-    
     lcd.drawLine(76,40,77,40,1);
     lcd.drawLine(79,40,80,40,1);
     lcd.drawLine(75,41,75,43,1);
@@ -24,3 +23,40 @@
     lcd.setPixel(79,45);
     lcd.setPixel(78,46);
 }
+
+void Stats::check_health(N5110 &lcd, int collisions)
+{
+    if (collisions == 0) 
+    {
+        lcd.drawLine(76,41,80,41,1);
+        lcd.drawLine(76,42,80,42,1);
+        lcd.drawLine(76,43,80,43,1);
+        lcd.drawLine(77,44,79,44,1);
+        lcd.setPixel(78,45);
+    }
+    else if (collisions == 1) 
+    {
+        lcd.drawLine(76,42,80,42,1);
+        lcd.drawLine(76,43,80,43,1);
+        lcd.drawLine(77,44,79,44,1);
+        lcd.setPixel(78,45);
+    }
+    else if (collisions == 2) 
+    {
+        lcd.drawLine(76,43,80,43,1);
+        lcd.drawLine(77,44,79,44,1);
+        lcd.setPixel(78,45);
+    }
+    else if (collisions == 3) 
+    {
+        lcd.drawLine(77,44,79,44,1);
+        lcd.setPixel(78,45);
+    }
+    else if (collisions == 4)
+    {
+        lcd.setPixel(78,45);
+    }     
+    else if (collisions >= 5)
+    {
+    }
+}
\ No newline at end of file