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.
Revision 2:5faf2fd6c613, committed 2018-11-23
- Comitter:
- Nicolas_11
- Date:
- Fri Nov 23 14:42:30 2018 +0000
- Parent:
- 1:323f1dad3ec4
- Commit message:
- Tetris
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Nov 23 13:22:49 2018 +0000
+++ b/main.cpp Fri Nov 23 14:42:30 2018 +0000
@@ -175,7 +175,7 @@
*/
if(pos_x==3){col2--;if(col2<2){col2=1;}}
if(pos_x==1){col2++;if(col2>=6){col2=6;}}
- //if(value_acceleroy>3){grado++;if(grado>4){grado=1;}giro(grado);}
+ if(value_acceleroy>3){grado++;if(grado>4){grado=1;}giro(grado);}
if(i>=1){
dat[1]=((Fig[0])>>col2-1) ;
dat[2]=((Fig[1])>>col2-1) ;
@@ -226,15 +226,15 @@
while(1){
in=a.getc();
Tipofig=a.getc();
- //vcol=a.getc();
+ vcol=a.getc();
grado=a.getc();
out=a.getc();
- vcol=rand()%7 +1;
- if(in==60 && Tipofig<=5 && grado<=4 && out==62){
+ //vcol=rand()%7 +1;
+ if(in==60 && Tipofig<=5 && vcol<7 && grado<=4 && out==62){
seleccion(Tipofig);
giro(grado);
imprimir(vcol);
-
+
}
else{
break;