Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super maraton #1482

Merged
merged 6 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/services/blocks-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
34 changes: 22 additions & 12 deletions app/utils/staticData/desafios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
17 changes: 9 additions & 8 deletions app/utils/staticData/grupos.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion public/pilas.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<head>
<script src="libs/pilasweb.js?v=0.5.0"></script>
<script src="libs/pilas-bloques-exercises.js?v=1.4.7"></script>
<script src="libs/pilas-bloques-exercises.js?v=1.4.9"></script>
</head>

</html>
25 changes: 25 additions & 0 deletions tests/integration/desafios/LaSupermaraton-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { moduloActividad, actividadTest } from '../../helpers/actividadTest';

const nombre = 'LaSupermaraton';

moduloActividad(nombre, () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Estaría bueno tener un test para el caso que falle (cuando corre de más)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hecho !


actividadTest(nombre, {
solucion: `<?xml version="1.0" encoding="UTF-8"?>
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="al_empezar_a_ejecutar" id="1" deletable="false" movable="false" editable="false" x="0" y="0">
<statement name="program">
<block type="Repetir" id="26" inline="true">
<value name="count">
<block type="KmsTotales" id="29" />
</value>
<statement name="block">
<block type="Avanzar1kmChuy" id="12" />
</statement>
</block>
</statement>
</block>
</xml>`,
});

});
13 changes: 9 additions & 4 deletions translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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!'
Expand Down Expand Up @@ -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: |
Expand All @@ -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?'
Expand Down
5 changes: 5 additions & 0 deletions translations/es-ar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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?'
Expand Down
5 changes: 5 additions & 0 deletions translations/pt-br.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down