-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43be389
commit b093593
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ | ||
|
||
} | ||
|
||
} |