CECS447 / Mbed 2 deprecated Final_Project

Dependencies:   mbed-rtos mbed draw_test EALib SWSPI

Files at this revision

API Documentation at this revision

Comitter:
AndyTran
Date:
Mon Dec 07 22:10:37 2015 +0000
Parent:
9:e6f3edc7f775
Commit message:
finsl

Changed in this revision

draw_test.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
--- a/draw_test.lib	Mon Dec 07 09:54:52 2015 +0000
+++ b/draw_test.lib	Mon Dec 07 22:10:37 2015 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/CECS460/code/draw_test/#1a54e4ed2669
+https://developer.mbed.org/teams/CECS460/code/draw_test/#e21ecfae42e4
--- a/main.cpp	Mon Dec 07 09:54:52 2015 +0000
+++ b/main.cpp	Mon Dec 07 22:10:37 2015 +0000
@@ -287,7 +287,7 @@
 {
     //check for winner by destroy all enemy ship;
     while (true) {
-        bool gamelost;
+        bool gamelost = 0;
         gamelost = battle.looser();
         //winner = 1;
         if (gamelost == 1) {
@@ -295,6 +295,10 @@
             led2 = 1;
             led3 = 1;
             xbee.printf("W0000E");
+            while(winner == 0)
+            {
+                osDelay(30);
+            }
             //this board is loser
             //send a message of 0x200 to the winner
         } else if (winner == 1) { //spi message is the winner)