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:
- 14:8abed4026326
- Parent:
- 13:eee9af3b4308
- Child:
- 15:5902cf545449
--- a/main.cpp Sat Dec 03 09:35:39 2016 +0000
+++ b/main.cpp Sat Dec 03 09:48:38 2016 +0000
@@ -59,6 +59,7 @@
int iShipType = 0;
unsigned long int uli = 0;
char m;
+
while(1) {
if(iShipType<8){
Vx = VRx.read() * 1024;
@@ -118,15 +119,18 @@
atk_enemy();
printf("This is enemy_platform.\n");
print_enemy_platform();
- if(IamWin()){printf("You win!\n");}else{state = 1;}
+ if(IamWin()==1){printf("You win!\n");}else{state = 1;}
}else{
enemy_atk();
printf("This is atk_platform.\n");
print_atk_platform();
printf("This is ship_destroyed. : ");
print_ship_destroyed();
- if(TellUrEnemy_uWin()){
- bt.putc('q');
+ if(TellUrEnemy_uWin()==1){
+ while(uli<100){
+ bt.putc('q');
+ uli++;
+ }
printf("BOO!! You lost!");
break;
}else{state = 0;}
@@ -385,6 +389,7 @@
int iPrintUturn = 0;
char m;
+ select_Position = 0;
while(1){
if(iPrintUturn==0){
printf("Your turn.\n");
