From bbbfa8c8f4fe182457675b3cb51fb2127ec8c2c4 Mon Sep 17 00:00:00 2001 From: Daniel Ferro Date: Fri, 6 Oct 2023 20:46:53 -0300 Subject: [PATCH 1/5] Supermaraton --- app/services/blocks-gallery.js | 6 ++++ app/utils/staticData/desafios.js | 34 ++++++++++++------- app/utils/staticData/grupos.js | 17 +++++----- .../desafios/LaSupermaraton-test.js | 25 ++++++++++++++ translations/en-us.yaml | 13 ++++--- translations/es-ar.yaml | 5 +++ translations/pt-br.yaml | 5 +++ 7 files changed, 81 insertions(+), 24 deletions(-) create mode 100644 tests/integration/desafios/LaSupermaraton-test.js diff --git a/app/services/blocks-gallery.js b/app/services/blocks-gallery.js index 3c034a4b..bd67dc2b 100644 --- a/app/services/blocks-gallery.js +++ b/app/services/blocks-gallery.js @@ -875,6 +875,12 @@ export default Service.extend({ argumentos: '{}', }); + this.crearBloqueAccion('Avanzar1kmChuy', 'move1Km', { + icono: 'icono.derecha.png', + comportamiento: 'CorrerHeroicamente', + argumentos: '{}', + }); + this.crearBloqueAccion('CambiarColor', 'changeLightColor', { icono: 'icono.cambiar.color.png', comportamiento: 'CambiarColor', diff --git a/app/utils/staticData/desafios.js b/app/utils/staticData/desafios.js index deca6a3d..dbe673ed 100644 --- a/app/utils/staticData/desafios.js +++ b/app/utils/staticData/desafios.js @@ -207,18 +207,6 @@ export const desafios = [ conditionalRepetition: true, } }, - { - id: "nuevo22", - nombre: 'CapyBuscaAGuyra', - escena: `new EscenaCapySolo("\ - [*,*,*,*,*],\ - ", { coleccion: ["G", "A"] })`, - bloques: ['Repetir', 'Si', 'SiNo', 'Hasta', 'Procedimiento', - 'VolverAlBordeIzquierdo', 'MoverACasillaDerecha', 'TocandoGuyra','SubirPajarito'], - expectations: { - conditionalRepetition: true, - } - }, { id: 23, nombre: 'FutbolRobots', @@ -2938,6 +2926,18 @@ export const desafios = [ conditionalRepetition: true, } }, + { + id: "nuevo22", + nombre: 'CapyBuscaAGuyra', + escena: `new EscenaCapySolo("\ + [*,*,*,*,*],\ + ", { coleccion: ["G", "A"] })`, + bloques: ['Repetir', 'Si', 'SiNo', 'Hasta', 'Procedimiento', + 'VolverAlBordeIzquierdo', 'MoverACasillaDerecha', 'TocandoGuyra','SubirPajarito'], + expectations: { + conditionalRepetition: true, + } + }, { id: 'nuevo23', nombre: 'FutbolAlSur', @@ -2982,6 +2982,16 @@ export const desafios = [ conditionalRepetition: true, } }, + { + id: 'nuevo26', + nombre: 'LaSupermaraton', + escena: 'SuperMaraton', + bloques: ['Procedimiento', 'KmsTotales', 'Avanzar1kmChuy', 'RepetirVacio', + 'Repetir', 'Si', 'SiNo', 'Hasta'], + expectations: { + decomposition: false + } + }, { id: 'nuevo27', nombre: 'ContandoDeNuevoManic', diff --git a/app/utils/staticData/grupos.js b/app/utils/staticData/grupos.js index c462b3d7..b08986ca 100644 --- a/app/utils/staticData/grupos.js +++ b/app/utils/staticData/grupos.js @@ -281,26 +281,27 @@ export const grupos = [ 'nuevo10', 'nuevo13', 'nuevo14', - 'nuevo38', - 'nuevo39', - 'nuevo40', - 'nuevo41', 'nuevo15', 'nuevo18', 'nuevo16', 'nuevo17', - 'nuevo42', - 'nuevo43', - 'nuevo44', - 'nuevo45', 'nuevo19', 'nuevo20', 'nuevo21', 'nuevo23', 'nuevo24', 'nuevo25', + 'nuevo26', 'nuevo27', 'nuevo28', + 'nuevo38', + 'nuevo39', + 'nuevo40', + 'nuevo41', + 'nuevo42', + 'nuevo43', + 'nuevo44', + 'nuevo45', 'nuevo132', 'nuevo133', 'nuevo134', diff --git a/tests/integration/desafios/LaSupermaraton-test.js b/tests/integration/desafios/LaSupermaraton-test.js new file mode 100644 index 00000000..27c6248e --- /dev/null +++ b/tests/integration/desafios/LaSupermaraton-test.js @@ -0,0 +1,25 @@ +import { moduloActividad, actividadTest } from '../../helpers/actividadTest'; + +const nombre = 'LaSupermaraton'; + +moduloActividad(nombre, () => { + + actividadTest(nombre, { + solucion: ` + + + + + + + + + + + + + + `, + }); + +}); \ No newline at end of file diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 911387f9..de1651b5 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -121,10 +121,6 @@ model: description: | The mouse is hungrier than ever! Guide him along the maze so that he can eat all pieces of cheese. Clue: before starting, push the “Run” button several times to learn how the scenario changes. clue: 'It is important to consider if the block’s condition called "Repeat until" is met at any given time. Otherwise, the program might never end!' - 'nuevo22': - title: Capy looks for Guyrá - description: Help Capy to find Guyrá - clue: '' '22': title: Detective Chaparro description: 'The detective should discover the guilty of a crime. Starting by the first on the left, interrogate each one of the suspects until you find the guilty party!' @@ -714,6 +710,10 @@ model: description: | Super Yvoty should wake up all the fireflies, but opposite to the previous challenge, there are cells without any firefly here. Could you use the same procedure you used in Super Tito 1? clue: The "Repeat until" block will repeat a sequence of actions until one condition is met. This is called "Conditional repetition". + 'nuevo22': + title: Capy looks for Guyrá + description: Help Capy to find Guyrá + clue: '' 'nuevo24': title: Powering all computers on description: | @@ -724,6 +724,11 @@ model: description: | Mañic should visit all boxes and count how many planets and stars are there in total. Clue: first think how you could count whether there is any planet or star in a particular box. Then think how you could count all celestial bodies in only one particular column. clue: 'Splitting a big problem into several little problems can help you better understand each of its parts. Even better: you can focus on solving smaller and easier parts!' + 'nuevo26': + title: Supermarathon + description: | + Chuy must carry out his morning routine, which consists of running a certain number of kilometers that varies day by day (between 15 and 45 km). Make Chuy always reach his destination without going over! Clue: look in the "Sensors" category if there is something that can help you. + clue: A "Repeat" block can be used with the value of a sensor. This allows a code sequence to be repeated the number of times indicated by the sensor 'nuevo27': title: Mañic counts again description: 'Mañic needs to count the celestial bodies again, but now she cannot check whether she reached the end of the column! Is there any sensor to help her?' diff --git a/translations/es-ar.yaml b/translations/es-ar.yaml index 5fa9c01c..34412243 100644 --- a/translations/es-ar.yaml +++ b/translations/es-ar.yaml @@ -765,6 +765,11 @@ model: description: | Mañic debe recorrer todas las casillas y contar cuántas estrellas y planetas hay en total. Pista: primero pensá cómo contarías si hay una estrella o un planeta en una casilla determinada. Luego pensá cómo harías para contar todos los astros de una sola columna. clue: Subdividir un problema grande en problemas más pequeños ayuda a comprender mejor cada una de las partes que lo componen. Además nos permite concentrarnos en resolver cuestiones más sencillas al problema original. + 'nuevo26': + title: La Supermaratón + description: | + Chuy debe realizar su rutina matutina que consiste en recorrer una cierta cantidad de kilómetros que varía día a día (entre 15 y 45 km). ¡Lográ que Chuy llegue siempre a destino sin pasarse! Pista: mirá en la categoría "Sensores" si hay algo que te pueda servir. + clue: Se puede usar un bloque "Repetir" con el valor de un sensor. Esto permite repetir una secuencia de código la cantidad de veces que indique el sensor 'nuevo27': title: Mañic cuenta de nuevo description: 'Mañic tiene que contar otra vez los astros, ¡pero ahora no puede verificar si ya llegó al final de una columna! ¿Habrá algún sensor que la pueda ayudar?' diff --git a/translations/pt-br.yaml b/translations/pt-br.yaml index fa5656dc..423c79b6 100644 --- a/translations/pt-br.yaml +++ b/translations/pt-br.yaml @@ -715,6 +715,11 @@ model: description: | Mañic deve passar por todos os quadrados e contar quantas estrelas e planetas existem no total. Dica: primeiro pense em como você contaria se houvesse uma estrela ou um planeta em um determinado quadrado. Em seguida, pense em como você faria para contar todos os corpos celestiais em uma única coluna. clue: Subdividir um grande problema em problemas menores ajuda a compreender melhor cada uma de suas partes componentes. Também nos permite focar na solução de questões mais simples do problema original. + 'nuevo26': + title: A Supermaratona + description: | + Chuy deve realizar sua caminhada matinal, que consiste em percorrer um determinado número de quilômetros que varia de dia para dia (entre 15 e 45 km). Certifique-se de que Chuy sempre chegue ao destino sem exagerar! Dica: procure na categoria "Sensores" se há algo que pode ajudar-te. + clue: Você pode usar um bloco "Repetir" com o valor de um sensor. Isso permite que uma sequência de código seja repetida o número de vezes indicado pelo sensor 'nuevo27': title: Mañic conta novamente description: Mañic tem que contar os astros novamente, mas agora ela não pode verificar se já atingiu o fim de uma coluna! Existe um sensor que pode ajudá-la? From 83219741eca991ace0fc892fc3d5c0057624de45 Mon Sep 17 00:00:00 2001 From: Daniel Ferro Date: Sat, 7 Oct 2023 18:48:35 -0300 Subject: [PATCH 2/5] pbe 1.4.9 --- package-lock.json | 6 +++--- package.json | 2 +- public/pilas.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 483836d6..0234bbe6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33036,9 +33036,9 @@ } }, "pilas-bloques-exercises": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.7.tgz", - "integrity": "sha512-TLT5YBblR0MlNYCI+EyAwYo3fTalFFze96aVCjnaQY3nOage837InrUniZsjx071WgIBKHbG6G6x/caB3dqlKg==", + "version": "1.4.9", + "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.9.tgz", + "integrity": "sha512-96Tdf5ckCzIEkBQwPHoFZpzUlVsY1uyOnHb5e6doC5imV4uE2V6EqE/QoIkGC7K6cIHcgL9rIouZJ3WJIfgZxQ==", "requires": { "pilasweb": "^0.5.0" } diff --git a/package.json b/package.json index 216fb2f6..c377767c 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "creador-de-desafios-pilasbloques": "^1.0.1", "mulang": "^6.0.5", "pilas-bloques-ember-intl": "^1.1.2", - "pilas-bloques-exercises": "1.4.7", + "pilas-bloques-exercises": "1.4.9", "pilasweb": "^0.5.0", "proceds-blockly": "^1.1.0", "ramda": "^0.28.0", diff --git a/public/pilas.html b/public/pilas.html index b372bdfb..42439078 100644 --- a/public/pilas.html +++ b/public/pilas.html @@ -22,7 +22,7 @@ - + From 6459177ee5cc18e335750cdb367aaaef928e3065 Mon Sep 17 00:00:00 2001 From: Daniel Ferro Date: Wed, 18 Oct 2023 13:24:06 -0300 Subject: [PATCH 3/5] test running more than expected --- tests/integration/desafios/LaSupermaraton-test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/integration/desafios/LaSupermaraton-test.js b/tests/integration/desafios/LaSupermaraton-test.js index 27c6248e..2d35fd83 100644 --- a/tests/integration/desafios/LaSupermaraton-test.js +++ b/tests/integration/desafios/LaSupermaraton-test.js @@ -22,4 +22,10 @@ moduloActividad(nombre, () => { `, }); + actividadTest(nombre, { + descripcionAdicional: 'Da error al querer correr más de lo que debería', + solucion: '100', + errorEsperado: 'Ya llegué, ¡no debo seguir corriendo!', + }); + }); \ No newline at end of file From 96a87dfea6bd11f95f57bfa8759bae80f38b69f4 Mon Sep 17 00:00:00 2001 From: Daniel Ferro <91342656+danielferro69@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:25:48 -0300 Subject: [PATCH 4/5] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 58504ea9..b625813a 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "clientjs": "^0.1.11", "creador-de-desafios-pilasbloques": "^1.0.1", "mulang": "^6.0.5", - "pilas-bloques-ember-intl": "^1.1.2" + "pilas-bloques-ember-intl": "^1.1.2", "pilas-bloques-exercises": "1.4.12", "pilasweb": "^0.5.0", "proceds-blockly": "^1.1.0", From 52eb539bc0c9b042e2e5500df250615c33245ce8 Mon Sep 17 00:00:00 2001 From: Daniel Ferro Date: Fri, 20 Oct 2023 16:17:02 -0300 Subject: [PATCH 5/5] Update pb-exercises 1.4.13 --- package-lock.json | 6 +++--- package.json | 2 +- public/pilas.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f7e5dc4c..14d80eb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33036,9 +33036,9 @@ } }, "pilas-bloques-exercises": { - "version": "1.4.9", - "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.9.tgz", - "integrity": "sha512-96Tdf5ckCzIEkBQwPHoFZpzUlVsY1uyOnHb5e6doC5imV4uE2V6EqE/QoIkGC7K6cIHcgL9rIouZJ3WJIfgZxQ==", + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.13.tgz", + "integrity": "sha512-MnkR1aoXVs1raHSkaT4ESlv+wBXGYy4k5BpboiyfLdn9dZYUiiB+8AnbrFQoSx/GXSOInCfQ9nsd/A/qhaq00Q==", "requires": { "pilasweb": "^0.5.0" } diff --git a/package.json b/package.json index b625813a..fb4063ef 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "creador-de-desafios-pilasbloques": "^1.0.1", "mulang": "^6.0.5", "pilas-bloques-ember-intl": "^1.1.2", - "pilas-bloques-exercises": "1.4.12", + "pilas-bloques-exercises": "1.4.13", "pilasweb": "^0.5.0", "proceds-blockly": "^1.1.0", "ramda": "^0.28.0", diff --git a/public/pilas.html b/public/pilas.html index 42439078..d51c8ee5 100644 --- a/public/pilas.html +++ b/public/pilas.html @@ -22,7 +22,7 @@ - +