Skip to content

Commit

Permalink
Update example.wlk
Browse files Browse the repository at this point in the history
  • Loading branch information
Santiago-GomezDeSalazar authored Nov 22, 2024
1 parent 4cbd022 commit 893be6c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion example.wlk
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
cclass Persona{
class Persona{
var edad
var emociones = []
var intensidadElevada = 300
// VER LO DEL EVENTO

method esAdolescente() = (edad > 12) && (edad < 19)

//PUNTO 2
method nuevaEmocion(emocion){
emociones.add(emocion)
}
Expand All @@ -15,6 +16,10 @@ cclass Persona{
method modificarIntensidadElevada(nuevaIntensidad){
intensidadElevada = nuevaIntensidad
}

method vivirEvento(unEvento){

}
}

class Evento{
Expand Down Expand Up @@ -56,9 +61,23 @@ class Furia inherits Emocion{

class Alegria inherits Emocion{

method darValorIntensidad(valor){
const valorAbs = valor.abs()
intensidad = valorAbs
}

override method puedeLiberarse(persona) = super(persona) && cantidadEventos.even()
}

class Tristeza inherits Emocion{
var causa = []
override method puedeLiberarse(persona) = super(persona) // VER LO DE MELANCOLIA
}

class Desagrado inherits Emocion{
override method puedeLiberarse(persona) = super(persona) && cantidadEventos > intensidad
}

class Temor inherits Desagrado{

}

0 comments on commit 893be6c

Please sign in to comment.