contains my game for the embedded systems project 2645

Dependencies:   mbed FXOS8700CQQQ

Committer:
OmarAlebiary
Date:
Tue Mar 26 00:57:12 2019 +0000
Revision:
7:7e50cac5e0f4
Parent:
6:958376d55d70
Child:
8:b547037f42be
added methods for end of game and game display screen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
OmarAlebiary 6:958376d55d70 1 #include "RocketRacer.h"
OmarAlebiary 6:958376d55d70 2
OmarAlebiary 6:958376d55d70 3
OmarAlebiary 6:958376d55d70 4
OmarAlebiary 7:7e50cac5e0f4 5 void RocketRacer::MainGameDisplay(N5110 &lcd){
OmarAlebiary 7:7e50cac5e0f4 6
OmarAlebiary 6:958376d55d70 7 lcd.clear();
OmarAlebiary 7:7e50cac5e0f4 8 lcd.drawRect(0,0,52,48,FILL_TRANSPARENT);
OmarAlebiary 7:7e50cac5e0f4 9 char buffer[14];
OmarAlebiary 7:7e50cac5e0f4 10 // char buffer1[14];
OmarAlebiary 7:7e50cac5e0f4 11 // int score=64;
OmarAlebiary 7:7e50cac5e0f4 12
OmarAlebiary 7:7e50cac5e0f4 13 sprintf(buffer,"score");
OmarAlebiary 7:7e50cac5e0f4 14 lcd.printString(buffer,55,0);
OmarAlebiary 7:7e50cac5e0f4 15 //sprintf(buffer1,"%d",score);
OmarAlebiary 7:7e50cac5e0f4 16 // lcd.printString(buffer1,58,1);
OmarAlebiary 6:958376d55d70 17 lcd.refresh();
OmarAlebiary 7:7e50cac5e0f4 18
OmarAlebiary 7:7e50cac5e0f4 19 }
OmarAlebiary 7:7e50cac5e0f4 20
OmarAlebiary 7:7e50cac5e0f4 21 void RocketRacer::EndGame(N5110 &lcd){
OmarAlebiary 7:7e50cac5e0f4 22 lcd.clear();
OmarAlebiary 7:7e50cac5e0f4 23 lcd.printString("Game over!!!",5,0);
OmarAlebiary 7:7e50cac5e0f4 24 lcd.printString("Better Luck ",2,2);
OmarAlebiary 7:7e50cac5e0f4 25 lcd.printString("next time",2,3);
OmarAlebiary 7:7e50cac5e0f4 26 lcd.refresh();
OmarAlebiary 7:7e50cac5e0f4 27
OmarAlebiary 7:7e50cac5e0f4 28 }