Skip to content

Commit

Permalink
Create emociones.wlk
Browse files Browse the repository at this point in the history
  • Loading branch information
regueiranehuen authored Nov 22, 2024
1 parent 43be389 commit b093593
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions emociones.wlk
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
class Emocion{
var intensidad=0 // Por default
var numElevada

method intensidad()=intensidad

// Num es un valor arbitrario que elijo yo
method intensidadElevada()=intensidad > numElevada
}

class Furia inherits Emocion{

method intensidadInicial(){
intensidad = 100
}

var palabrotas = []

method puedeLiberarse(persona){
return self.intensidadElevada() && palabrotas.any({p=>p.size() > 7})
}

method liberarse(evento){
intensidad -= evento.impacto()
palabrotas.remove(palabrotas.first())
}

}

class Alegria inherits Emocion{





method puedeLiberarse(persona){

}

method liberarse(evento){

}

}

0 comments on commit b093593

Please sign in to comment.