-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtipo.java
More file actions
51 lines (36 loc) · 1.04 KB
/
tipo.java
File metadata and controls
51 lines (36 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package lordOfTheRings;
import java.io.Serializable;
public enum tipo implements Serializable {
/**
* Creación de los distintos tipos de heroes y bestias que contiene el juego
*/
//HEROES
Mago("Heroe", 20),
Elfo("Heroe", 10),
Enano("Heroe", 5),
Humano("Heroe", 0),
Hobbit("Heroe", -5),
//BESTIAS
Nazgul("Bestia", 15),
Orco("Bestia", 0),
Trol("Bestia", 8),
Trasgo("Bestia", 0);
/**
* Con la variable TIPO PERSONAJE identificaremos si se trata de un héroe o de una bestia al rellenar el ComboBox
* Con la variable RABIA se configurará la subida en la ofensiva contra los enemigos según el tipo de personaje
*/
private String tipoPersonaje;
private int rabia;
//CONSTRUCTOR
tipo(String tipoPersonaje, int rabia) {
this.tipoPersonaje = tipoPersonaje;
this.rabia = rabia;
}
//GETTERS Y SETTERS NECESARIOS
public String getTipoPersonaje() {
return tipoPersonaje;
}
public int getRabia() {
return rabia;
}
}