Reham Faqehi / Mbed 2 deprecated fy15raf

Dependencies:   mbed

Fork of fy15raf by ELEC2645 (2017/18)

Revision:
7:06c86ec1f19d
Parent:
6:7b733b2a6cf6
Child:
9:e70179ff61c5
--- a/Rocket/Rocket.cpp	Fri Apr 20 21:03:05 2018 +0000
+++ b/Rocket/Rocket.cpp	Tue Apr 24 10:17:39 2018 +0000
@@ -68,7 +68,6 @@
     return p;    
 }
 
-
 void Rocket::add_score()
 {
     _score++;
@@ -77,4 +76,43 @@
 int Rocket::get_score()
 {
     return _score;
+}
+
+void Rocket::drawFullHearts(N5110 &lcd)
+{
+   int sprite[5][17] =   {
+    
+    { 1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1, },
+    { 1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1, },
+    { 1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1, },
+    { 0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0, },
+    { 0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0, },
+};
+    lcd.drawSprite(0,0,5,17,(int *)sprite);
+}
+
+void Rocket::drawTwoHearts(N5110 &lcd)
+{
+   int sprite[5][17] =   {
+    
+    { 1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1, },
+    { 1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,0,1, },
+    { 1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,0,1, },
+    { 0,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,0, },
+    { 0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0, },
+};
+    lcd.drawSprite(0,0,5,17,(int *)sprite);
+}
+
+void Rocket::drawOneHeart(N5110 &lcd)
+{
+   int sprite[5][17] =   {
+    
+    { 1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1, },
+    { 1,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1, },
+    { 1,1,1,1,1,0,1,0,0,0,1,0,1,0,0,0,1, },
+    { 0,1,1,1,0,0,0,1,0,1,0,0,0,1,0,1,0, },
+    { 0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0, },
+};
+    lcd.drawSprite(1,1,5,17,(int *)sprite);
 }
\ No newline at end of file