Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of project_ShipDot by
Diff: main.cpp
- Revision:
- 12:287c6a9560ca
- Parent:
- 11:305164107874
- Child:
- 13:eee9af3b4308
--- a/main.cpp Sat Dec 03 08:40:28 2016 +0000
+++ b/main.cpp Sat Dec 03 09:06:18 2016 +0000
@@ -97,19 +97,24 @@
}else{
if(enemy_ready!=1){
printf("sent E\n");
- while(uli<1000){
+ while(uli<50){
bt.printf("E");
uli++;
}
+ }else{
+ bt.putc('l');
}
printf("\n");
break;
}
}
+ if(enemy_ready == 0){
+ printf("Wait for enemy\n");
+ while(1){if(bt.readable()){if(bt.getc()=='l'){break;}}}
+ state = 0;
+ }else{state = 1;}
+ while(1) { //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Play
select_Position = 0;
- printf("%d",enemy_ready);
- if(enemy_ready == 1){state = 1;}else{state = 0;}
- while(1) { //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Play
if(state == 0){
atk_enemy();
printf("This is enemy_platform.\n");
@@ -301,7 +306,6 @@
for(j=0;j<15;j++){
if(ship4[i]==ship_underATK[j]){
ship_destroyed[0]++;
- printf("%d || %d : %d\n",ship_destroyed[0],ship4[i],ship_underATK[j]);
}
}
}
