this is an lcd program for a game

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
akashdd
Date:
Wed Oct 23 06:00:16 2013 +0000
Commit message:
hey

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 0d7325bb3025 TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Wed Oct 23 06:00:16 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/sbts/code/TextLCD/#122fc41ed965
diff -r 000000000000 -r 0d7325bb3025 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 23 06:00:16 2013 +0000
@@ -0,0 +1,53 @@
+// Hello World! for the TextLCD
+
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
+int x=9;
+int y=9;
+int z;
+int main() {
+
+    lcd.printf("PLAYER-1...");
+     lcd.printf("%i\n",x);
+      lcd.printf("PLAYER-2...");
+      lcd.printf("%i",y);
+      if((x>=9)||(y>=9))
+      {
+      lcd.cls();
+
+       if(x>y)
+       {
+       while(1){
+       lcd.printf("****CONGRATS****\n");
+       wait(0.5);
+       lcd.cls();
+       lcd.printf("PLAYER-1 won by");
+       int z = x-y;
+       lcd.printf("%i",z);
+       lcd.printf("points");
+       wait(0.5);
+       lcd.cls();}
+       }
+       if(x<y)
+       {
+       while(1){
+       lcd.printf("****CONGRATS****\n");
+       wait(0.5);
+       lcd.cls();
+       lcd.printf("PLAYER-2 wins by");
+       int z = y-x;
+       lcd.printf("%i",z);
+       lcd.printf("points");
+       wait(0.5);
+       lcd.cls();}
+       }
+       if(x==y)
+       {
+       lcd.printf("MATCH TIED\n");
+     }
+}
+
+       }
+     
\ No newline at end of file
diff -r 000000000000 -r 0d7325bb3025 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Oct 23 06:00:16 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file