Juan Ignacio Jimenez Copati
/
tp1_ktane
bomba
main.cpp@0:c015c84abb0a, 2019-06-04 (annotated)
- Committer:
- juanijc
- Date:
- Tue Jun 04 13:49:59 2019 +0000
- Revision:
- 0:c015c84abb0a
bomba;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
juanijc | 0:c015c84abb0a | 1 | #include "mbed.h" |
juanijc | 0:c015c84abb0a | 2 | #include "tsi_sensor.h" |
juanijc | 0:c015c84abb0a | 3 | |
juanijc | 0:c015c84abb0a | 4 | //tsi |
juanijc | 0:c015c84abb0a | 5 | #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z) |
juanijc | 0:c015c84abb0a | 6 | #define ELEC0 9 |
juanijc | 0:c015c84abb0a | 7 | #define ELEC1 10 |
juanijc | 0:c015c84abb0a | 8 | #elif defined (TARGET_KL05Z) |
juanijc | 0:c015c84abb0a | 9 | #define ELEC0 9 |
juanijc | 0:c015c84abb0a | 10 | #define ELEC1 8 |
juanijc | 0:c015c84abb0a | 11 | #else |
juanijc | 0:c015c84abb0a | 12 | #error TARGET NOT DEFINED |
juanijc | 0:c015c84abb0a | 13 | #endif |
juanijc | 0:c015c84abb0a | 14 | TSIAnalogSlider tsi(ELEC0, ELEC1, 40); |
juanijc | 0:c015c84abb0a | 15 | |
juanijc | 0:c015c84abb0a | 16 | enum estados_me_proceso {espera, conteo, comparo, fin, bum}; |
juanijc | 0:c015c84abb0a | 17 | enum estados_me_proceso me_proceso_estado = espera; |
juanijc | 0:c015c84abb0a | 18 | enum estados_me_titilar_display {on1, off1}; |
juanijc | 0:c015c84abb0a | 19 | enum estados_me_titilar_display me_titilar_display_estado = on1; |
juanijc | 0:c015c84abb0a | 20 | |
juanijc | 0:c015c84abb0a | 21 | //entradas |
juanijc | 0:c015c84abb0a | 22 | DigitalIn cable_1(PTC1); |
juanijc | 0:c015c84abb0a | 23 | DigitalIn cable_2(PTC2); |
juanijc | 0:c015c84abb0a | 24 | DigitalIn cable_3(PTB3); |
juanijc | 0:c015c84abb0a | 25 | DigitalIn cable_4(PTB2); |
juanijc | 0:c015c84abb0a | 26 | |
juanijc | 0:c015c84abb0a | 27 | //salidas |
juanijc | 0:c015c84abb0a | 28 | BusOut unidades_(PTA1,PTA13,PTD4,PTA12); |
juanijc | 0:c015c84abb0a | 29 | BusOut decenas_(PTA4,PTA5,PTC8,PTC9); |
juanijc | 0:c015c84abb0a | 30 | PwmOut led_verde(LED_GREEN); |
juanijc | 0:c015c84abb0a | 31 | PwmOut led_rojo(LED_RED); |
juanijc | 0:c015c84abb0a | 32 | |
juanijc | 0:c015c84abb0a | 33 | //ME y funciones empleadas |
juanijc | 0:c015c84abb0a | 34 | void me_proceso(); |
juanijc | 0:c015c84abb0a | 35 | void display_bcd(); |
juanijc | 0:c015c84abb0a | 36 | void detector(); |
juanijc | 0:c015c84abb0a | 37 | void tiempo(); |
juanijc | 0:c015c84abb0a | 38 | void me_titilar_display(); |
juanijc | 0:c015c84abb0a | 39 | int azar(); |
juanijc | 0:c015c84abb0a | 40 | |
juanijc | 0:c015c84abb0a | 41 | Ticker t; |
juanijc | 0:c015c84abb0a | 42 | |
juanijc | 0:c015c84abb0a | 43 | //retencion o habilitacion |
juanijc | 0:c015c84abb0a | 44 | int primera=0, hab_comparacion=0, prioridad=0, a=0, ant_[4]= {0}; |
juanijc | 0:c015c84abb0a | 45 | //tiempo |
juanijc | 0:c015c84abb0a | 46 | int segundos=0, segundos_transformados=0,detener=0, tmo=0, decenas, unidades; |
juanijc | 0:c015c84abb0a | 47 | //utilizadas en azar() |
juanijc | 0:c015c84abb0a | 48 | int cantidad_azar=0, memoria_azar[3]= {0,0,0}, cable_correcto=0; |
juanijc | 0:c015c84abb0a | 49 | int secuencia[4]; |
juanijc | 0:c015c84abb0a | 50 | int sacados[4]; |
juanijc | 0:c015c84abb0a | 51 | //estados |
juanijc | 0:c015c84abb0a | 52 | int i; |
juanijc | 0:c015c84abb0a | 53 | int nivel=0; |
juanijc | 0:c015c84abb0a | 54 | int start=0; |
juanijc | 0:c015c84abb0a | 55 | |
juanijc | 0:c015c84abb0a | 56 | |
juanijc | 0:c015c84abb0a | 57 | |
juanijc | 0:c015c84abb0a | 58 | int main() |
juanijc | 0:c015c84abb0a | 59 | { |
juanijc | 0:c015c84abb0a | 60 | //llamo a la funcion tiempo() cada 0.01 seg |
juanijc | 0:c015c84abb0a | 61 | t.attach(&tiempo,0.01); |
juanijc | 0:c015c84abb0a | 62 | //estado inicial de leds |
juanijc | 0:c015c84abb0a | 63 | led_verde=1; |
juanijc | 0:c015c84abb0a | 64 | led_rojo=1; |
juanijc | 0:c015c84abb0a | 65 | while(true) { |
juanijc | 0:c015c84abb0a | 66 | //ME |
juanijc | 0:c015c84abb0a | 67 | me_proceso(); |
juanijc | 0:c015c84abb0a | 68 | me_titilar_display(); |
juanijc | 0:c015c84abb0a | 69 | //funciones que operan constantemente |
juanijc | 0:c015c84abb0a | 70 | display_bcd(); |
juanijc | 0:c015c84abb0a | 71 | detector(); |
juanijc | 0:c015c84abb0a | 72 | } |
juanijc | 0:c015c84abb0a | 73 | } |
juanijc | 0:c015c84abb0a | 74 | |
juanijc | 0:c015c84abb0a | 75 | void me_proceso() |
juanijc | 0:c015c84abb0a | 76 | { |
juanijc | 0:c015c84abb0a | 77 | |
juanijc | 0:c015c84abb0a | 78 | switch(me_proceso_estado) { |
juanijc | 0:c015c84abb0a | 79 | |
juanijc | 0:c015c84abb0a | 80 | default: |
juanijc | 0:c015c84abb0a | 81 | //estado de espera: pongo estados iniciales de variables. al pulsar el TSI se da inicio |
juanijc | 0:c015c84abb0a | 82 | case espera: |
juanijc | 0:c015c84abb0a | 83 | |
juanijc | 0:c015c84abb0a | 84 | if(primera==0) { |
juanijc | 0:c015c84abb0a | 85 | printf("\nConecte todos los cables a masa y pulse el TSI para iniciar\n"); |
juanijc | 0:c015c84abb0a | 86 | primera=1; |
juanijc | 0:c015c84abb0a | 87 | i=0; |
juanijc | 0:c015c84abb0a | 88 | } |
juanijc | 0:c015c84abb0a | 89 | |
juanijc | 0:c015c84abb0a | 90 | if(tsi.readPercentage()>0.35 && tsi.readPercentage()<0.65 && cable_1==0 && cable_2==0 && cable_3==0 && cable_4==0) { |
juanijc | 0:c015c84abb0a | 91 | me_proceso_estado=conteo; |
juanijc | 0:c015c84abb0a | 92 | primera=0; |
juanijc | 0:c015c84abb0a | 93 | detener=0; |
juanijc | 0:c015c84abb0a | 94 | segundos=0; |
juanijc | 0:c015c84abb0a | 95 | printf("\nInicia el conteo\n"); |
juanijc | 0:c015c84abb0a | 96 | } |
juanijc | 0:c015c84abb0a | 97 | //genero secuencia aleatoria |
juanijc | 0:c015c84abb0a | 98 | for(i=0; i<4; i++) { |
juanijc | 0:c015c84abb0a | 99 | secuencia[i]=azar(); |
juanijc | 0:c015c84abb0a | 100 | } |
juanijc | 0:c015c84abb0a | 101 | |
juanijc | 0:c015c84abb0a | 102 | break; |
juanijc | 0:c015c84abb0a | 103 | |
juanijc | 0:c015c84abb0a | 104 | case conteo: |
juanijc | 0:c015c84abb0a | 105 | //establezco el tiempo de los displays y muestro secuencia correcta |
juanijc | 0:c015c84abb0a | 106 | if(primera==0) { |
juanijc | 0:c015c84abb0a | 107 | led_verde=1; |
juanijc | 0:c015c84abb0a | 108 | led_rojo=1; |
juanijc | 0:c015c84abb0a | 109 | if(segundos==0) |
juanijc | 0:c015c84abb0a | 110 | segundos=3000; |
juanijc | 0:c015c84abb0a | 111 | primera=1; |
juanijc | 0:c015c84abb0a | 112 | start=1; |
juanijc | 0:c015c84abb0a | 113 | printf("%i\n",secuencia[0]); |
juanijc | 0:c015c84abb0a | 114 | printf("%i\n",secuencia[1]); |
juanijc | 0:c015c84abb0a | 115 | printf("%i\n",secuencia[2]); |
juanijc | 0:c015c84abb0a | 116 | printf("%i\n",secuencia[3]); |
juanijc | 0:c015c84abb0a | 117 | } |
juanijc | 0:c015c84abb0a | 118 | //si hab_comparacion==1, voy al estado "comparo" |
juanijc | 0:c015c84abb0a | 119 | if(hab_comparacion==1) |
juanijc | 0:c015c84abb0a | 120 | me_proceso_estado=comparo; |
juanijc | 0:c015c84abb0a | 121 | |
juanijc | 0:c015c84abb0a | 122 | |
juanijc | 0:c015c84abb0a | 123 | break; |
juanijc | 0:c015c84abb0a | 124 | //en este estado verifico si el cable sacado coincide con la secuencia correcta |
juanijc | 0:c015c84abb0a | 125 | case comparo: |
juanijc | 0:c015c84abb0a | 126 | //si coincide vuelvo al estado "conteo" y doy el mensaje de "correcto" |
juanijc | 0:c015c84abb0a | 127 | if(secuencia[a-1]==sacados[a-1]) { |
juanijc | 0:c015c84abb0a | 128 | me_proceso_estado=conteo; |
juanijc | 0:c015c84abb0a | 129 | nivel++; |
juanijc | 0:c015c84abb0a | 130 | hab_comparacion=0; |
juanijc | 0:c015c84abb0a | 131 | printf("Correcto!\n"); |
juanijc | 0:c015c84abb0a | 132 | //si no coincide, paso al estado "bum" |
juanijc | 0:c015c84abb0a | 133 | } else { |
juanijc | 0:c015c84abb0a | 134 | primera=0; |
juanijc | 0:c015c84abb0a | 135 | me_proceso_estado=bum; |
juanijc | 0:c015c84abb0a | 136 | hab_comparacion=0; |
juanijc | 0:c015c84abb0a | 137 | } |
juanijc | 0:c015c84abb0a | 138 | //si llego al nivel 4 (4 cables sacados correctamente) voy al estado "fin" |
juanijc | 0:c015c84abb0a | 139 | if(nivel==4) { |
juanijc | 0:c015c84abb0a | 140 | primera=0; |
juanijc | 0:c015c84abb0a | 141 | me_proceso_estado=fin; |
juanijc | 0:c015c84abb0a | 142 | } |
juanijc | 0:c015c84abb0a | 143 | |
juanijc | 0:c015c84abb0a | 144 | break; |
juanijc | 0:c015c84abb0a | 145 | //en este estado informo al usuario que gano y preparo las variables para un nuevo juego |
juanijc | 0:c015c84abb0a | 146 | case fin: |
juanijc | 0:c015c84abb0a | 147 | |
juanijc | 0:c015c84abb0a | 148 | led_verde=0; |
juanijc | 0:c015c84abb0a | 149 | |
juanijc | 0:c015c84abb0a | 150 | if(primera==0) { |
juanijc | 0:c015c84abb0a | 151 | printf("\nGanaste!\nPulse el TSI para volver al comienzo\n"); |
juanijc | 0:c015c84abb0a | 152 | primera=1; |
juanijc | 0:c015c84abb0a | 153 | cable_correcto=0; |
juanijc | 0:c015c84abb0a | 154 | detener=1; |
juanijc | 0:c015c84abb0a | 155 | nivel=0; |
juanijc | 0:c015c84abb0a | 156 | } |
juanijc | 0:c015c84abb0a | 157 | //si pulso el TSI paso al estado "espera" |
juanijc | 0:c015c84abb0a | 158 | if(tsi.readPercentage()>=0.35&&tsi.readPercentage()<=0.65) { |
juanijc | 0:c015c84abb0a | 159 | primera=0; |
juanijc | 0:c015c84abb0a | 160 | start=0; |
juanijc | 0:c015c84abb0a | 161 | me_proceso_estado=espera; |
juanijc | 0:c015c84abb0a | 162 | } |
juanijc | 0:c015c84abb0a | 163 | break; |
juanijc | 0:c015c84abb0a | 164 | //en este estado informo al usuario que perdio y preparo las variables para un nuevo juego |
juanijc | 0:c015c84abb0a | 165 | case bum: |
juanijc | 0:c015c84abb0a | 166 | |
juanijc | 0:c015c84abb0a | 167 | if(primera==0) { |
juanijc | 0:c015c84abb0a | 168 | printf("\nPerdiste...\nPulse el TSI para volver al comienzo\n"); |
juanijc | 0:c015c84abb0a | 169 | primera=1; |
juanijc | 0:c015c84abb0a | 170 | cable_correcto=0; |
juanijc | 0:c015c84abb0a | 171 | detener=1; |
juanijc | 0:c015c84abb0a | 172 | nivel=0; |
juanijc | 0:c015c84abb0a | 173 | } |
juanijc | 0:c015c84abb0a | 174 | //si pulso el TSI paso al estado "espera" |
juanijc | 0:c015c84abb0a | 175 | if(tsi.readPercentage()>=0.35&&tsi.readPercentage()<=0.65) { |
juanijc | 0:c015c84abb0a | 176 | primera=0; |
juanijc | 0:c015c84abb0a | 177 | start=0; |
juanijc | 0:c015c84abb0a | 178 | me_proceso_estado=espera; |
juanijc | 0:c015c84abb0a | 179 | } |
juanijc | 0:c015c84abb0a | 180 | break; |
juanijc | 0:c015c84abb0a | 181 | } |
juanijc | 0:c015c84abb0a | 182 | } |
juanijc | 0:c015c84abb0a | 183 | //variable que maneja el tiempo |
juanijc | 0:c015c84abb0a | 184 | void tiempo() |
juanijc | 0:c015c84abb0a | 185 | { |
juanijc | 0:c015c84abb0a | 186 | //si el juego esta en curso ("detener"==0) que descuente a la variable "segundos" |
juanijc | 0:c015c84abb0a | 187 | if(detener==0) { |
juanijc | 0:c015c84abb0a | 188 | if(segundos>0) |
juanijc | 0:c015c84abb0a | 189 | segundos--; |
juanijc | 0:c015c84abb0a | 190 | } |
juanijc | 0:c015c84abb0a | 191 | //variable utilizada para hacer titilar display y led |
juanijc | 0:c015c84abb0a | 192 | if(tmo!=0) |
juanijc | 0:c015c84abb0a | 193 | tmo--; |
juanijc | 0:c015c84abb0a | 194 | //si el tiempo llega a 0, el juego fue iniciado y estaba en curso ==> pasa a estado "bum" |
juanijc | 0:c015c84abb0a | 195 | if(segundos==0 && start==1 && detener==0) { |
juanijc | 0:c015c84abb0a | 196 | me_proceso_estado=bum; |
juanijc | 0:c015c84abb0a | 197 | primera=0; |
juanijc | 0:c015c84abb0a | 198 | detener=1; |
juanijc | 0:c015c84abb0a | 199 | } |
juanijc | 0:c015c84abb0a | 200 | |
juanijc | 0:c015c84abb0a | 201 | } |
juanijc | 0:c015c84abb0a | 202 | //ME que hace titilar el display y el led rojo |
juanijc | 0:c015c84abb0a | 203 | void me_titilar_display() |
juanijc | 0:c015c84abb0a | 204 | { |
juanijc | 0:c015c84abb0a | 205 | switch(me_titilar_display_estado) { |
juanijc | 0:c015c84abb0a | 206 | default: |
juanijc | 0:c015c84abb0a | 207 | case on1: |
juanijc | 0:c015c84abb0a | 208 | led_rojo=1; |
juanijc | 0:c015c84abb0a | 209 | //si se termina el juego activo el proceso de titilar. 1/2 seg prendiso y 1/2 seg apagado |
juanijc | 0:c015c84abb0a | 210 | if(tmo==0 && detener==1) { |
juanijc | 0:c015c84abb0a | 211 | tmo=50; |
juanijc | 0:c015c84abb0a | 212 | //poniendo el BCD del banquito de ensayos con un nro mayor a 9, se apaga |
juanijc | 0:c015c84abb0a | 213 | unidades_=12; |
juanijc | 0:c015c84abb0a | 214 | decenas_=12; |
juanijc | 0:c015c84abb0a | 215 | me_titilar_display_estado=off1; |
juanijc | 0:c015c84abb0a | 216 | //para no solapar esta ME y la de display_bcd() |
juanijc | 0:c015c84abb0a | 217 | prioridad=1; |
juanijc | 0:c015c84abb0a | 218 | if(me_proceso_estado==bum) |
juanijc | 0:c015c84abb0a | 219 | led_rojo=0; |
juanijc | 0:c015c84abb0a | 220 | } |
juanijc | 0:c015c84abb0a | 221 | break; |
juanijc | 0:c015c84abb0a | 222 | |
juanijc | 0:c015c84abb0a | 223 | case off1: |
juanijc | 0:c015c84abb0a | 224 | |
juanijc | 0:c015c84abb0a | 225 | if(tmo==0) { |
juanijc | 0:c015c84abb0a | 226 | tmo=50; |
juanijc | 0:c015c84abb0a | 227 | led_rojo=1; |
juanijc | 0:c015c84abb0a | 228 | me_titilar_display_estado=on1; |
juanijc | 0:c015c84abb0a | 229 | prioridad=0; |
juanijc | 0:c015c84abb0a | 230 | led_rojo=1; |
juanijc | 0:c015c84abb0a | 231 | } |
juanijc | 0:c015c84abb0a | 232 | break; |
juanijc | 0:c015c84abb0a | 233 | } |
juanijc | 0:c015c84abb0a | 234 | } |
juanijc | 0:c015c84abb0a | 235 | //funcion que genera la secuencia aleatoria sin repetir nros |
juanijc | 0:c015c84abb0a | 236 | int azar() |
juanijc | 0:c015c84abb0a | 237 | { |
juanijc | 0:c015c84abb0a | 238 | cantidad_azar++; |
juanijc | 0:c015c84abb0a | 239 | while(cable_correcto==memoria_azar[0]||cable_correcto==memoria_azar[1]||cable_correcto==memoria_azar[2]) { |
juanijc | 0:c015c84abb0a | 240 | cable_correcto=rand()%4+1; |
juanijc | 0:c015c84abb0a | 241 | } |
juanijc | 0:c015c84abb0a | 242 | //guardo los nros generados para no repetirlos |
juanijc | 0:c015c84abb0a | 243 | switch(cantidad_azar) { |
juanijc | 0:c015c84abb0a | 244 | default: |
juanijc | 0:c015c84abb0a | 245 | case 1: |
juanijc | 0:c015c84abb0a | 246 | memoria_azar[0]=cable_correcto; |
juanijc | 0:c015c84abb0a | 247 | break; |
juanijc | 0:c015c84abb0a | 248 | case 2: |
juanijc | 0:c015c84abb0a | 249 | memoria_azar[1]=cable_correcto; |
juanijc | 0:c015c84abb0a | 250 | break; |
juanijc | 0:c015c84abb0a | 251 | case 3: |
juanijc | 0:c015c84abb0a | 252 | memoria_azar[2]=cable_correcto; |
juanijc | 0:c015c84abb0a | 253 | break; |
juanijc | 0:c015c84abb0a | 254 | case 4: |
juanijc | 0:c015c84abb0a | 255 | memoria_azar[0]=0; |
juanijc | 0:c015c84abb0a | 256 | memoria_azar[1]=0; |
juanijc | 0:c015c84abb0a | 257 | memoria_azar[2]=0; |
juanijc | 0:c015c84abb0a | 258 | cantidad_azar=0; |
juanijc | 0:c015c84abb0a | 259 | break; |
juanijc | 0:c015c84abb0a | 260 | } |
juanijc | 0:c015c84abb0a | 261 | return cable_correcto; |
juanijc | 0:c015c84abb0a | 262 | } |
juanijc | 0:c015c84abb0a | 263 | //funcion que detecta cuando saco un cable |
juanijc | 0:c015c84abb0a | 264 | void detector() |
juanijc | 0:c015c84abb0a | 265 | { |
juanijc | 0:c015c84abb0a | 266 | //cada vez que saco un cable ==> hab_comparacion==1 |
juanijc | 0:c015c84abb0a | 267 | if(cable_1!=0 && ant_[0]==0) { |
juanijc | 0:c015c84abb0a | 268 | ant_[0]=1; |
juanijc | 0:c015c84abb0a | 269 | sacados[a]=1; |
juanijc | 0:c015c84abb0a | 270 | a++; |
juanijc | 0:c015c84abb0a | 271 | hab_comparacion=1; |
juanijc | 0:c015c84abb0a | 272 | } |
juanijc | 0:c015c84abb0a | 273 | if(cable_2!=0 && ant_[1]==0) { |
juanijc | 0:c015c84abb0a | 274 | ant_[1]=1; |
juanijc | 0:c015c84abb0a | 275 | sacados[a]=2; |
juanijc | 0:c015c84abb0a | 276 | a++; |
juanijc | 0:c015c84abb0a | 277 | hab_comparacion=1; |
juanijc | 0:c015c84abb0a | 278 | } |
juanijc | 0:c015c84abb0a | 279 | if(cable_3!=0 && ant_[2]==0) { |
juanijc | 0:c015c84abb0a | 280 | ant_[2]=1; |
juanijc | 0:c015c84abb0a | 281 | sacados[a]=3; |
juanijc | 0:c015c84abb0a | 282 | a++; |
juanijc | 0:c015c84abb0a | 283 | hab_comparacion=1; |
juanijc | 0:c015c84abb0a | 284 | } |
juanijc | 0:c015c84abb0a | 285 | if(cable_4!=0 && ant_[3]==0) { |
juanijc | 0:c015c84abb0a | 286 | ant_[3]=1; |
juanijc | 0:c015c84abb0a | 287 | sacados[a]=4; |
juanijc | 0:c015c84abb0a | 288 | a++; |
juanijc | 0:c015c84abb0a | 289 | hab_comparacion=1; |
juanijc | 0:c015c84abb0a | 290 | } |
juanijc | 0:c015c84abb0a | 291 | //si se termina el juego, vuelvo las variables a su estado de inicio |
juanijc | 0:c015c84abb0a | 292 | if(detener==1) { |
juanijc | 0:c015c84abb0a | 293 | a=0; |
juanijc | 0:c015c84abb0a | 294 | ant_[0]=0; |
juanijc | 0:c015c84abb0a | 295 | ant_[1]=0; |
juanijc | 0:c015c84abb0a | 296 | ant_[2]=0; |
juanijc | 0:c015c84abb0a | 297 | ant_[3]=0; |
juanijc | 0:c015c84abb0a | 298 | |
juanijc | 0:c015c84abb0a | 299 | } |
juanijc | 0:c015c84abb0a | 300 | } |
juanijc | 0:c015c84abb0a | 301 | //funcion que traduce los segundos en binario y lo entrega al BCD del banquito de ensayos |
juanijc | 0:c015c84abb0a | 302 | void display_bcd() |
juanijc | 0:c015c84abb0a | 303 | { |
juanijc | 0:c015c84abb0a | 304 | segundos_transformados=segundos/100; |
juanijc | 0:c015c84abb0a | 305 | decenas=segundos_transformados/10; |
juanijc | 0:c015c84abb0a | 306 | unidades=segundos_transformados%10; |
juanijc | 0:c015c84abb0a | 307 | |
juanijc | 0:c015c84abb0a | 308 | if(prioridad==0) { |
juanijc | 0:c015c84abb0a | 309 | unidades_=unidades; |
juanijc | 0:c015c84abb0a | 310 | decenas_=decenas; |
juanijc | 0:c015c84abb0a | 311 | } |
juanijc | 0:c015c84abb0a | 312 | } |