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

Crear logica de clasificacion de partida #107

Open
9gustin opened this issue Sep 21, 2021 · 0 comments
Open

Crear logica de clasificacion de partida #107

9gustin opened this issue Sep 21, 2021 · 0 comments

Comments

@9gustin
Copy link
Collaborator

9gustin commented Sep 21, 2021

No hay que integrar con la vista, solamente crear esa logica.

A partir del modelo para guardar las validaciones:

{
"1": {
"validation": {
"PLAYER_KEY_JUGADOR_Q_VALIDA": {
"categories": {
"Nombres": {
"INVITADO_1_KEY": true,
"INVITADO_2_KEY": false,
"INVITADO_3_KEY": true
},
"Animales": {
"Burro": false,
"Ma": true
}
}
}
}
}
}

Generar un método dentro del contexto de partida que genere la clasificacion de la partida. El json que retorna debe tener la siguiente estructura:

[
{
id: 1,
name: 'Pepito',
score: 25,
position: 2,
image: 'avatar'
},
{
id: 2,
name: 'Pepito',
score: 35,
position: 2,
image: 'avatar4'
},
{
id: 3,
name: 'Mengano',
score: 45,
position: 1,
image: 'avatar2'
},
{
id: 4,
name: 'Sultano',
score: 18,
position: 4,
image: 'avatar3'
},
{
id: 5,
name: 'Pepito2',
score: 5,
position: 5,
image: 'avatar5'
}
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant