Ejercicio rpg
This commit is contained in:
1 parent
fc32b4682d
commit
cf7bb1f1b9
1 file changed
+3
-3
@@ -27,7 +27,7 @@ void main() {
|
||||
System.out.println("Bosque, cueva, castillo");
|
||||
String ubicacion = sc.next().toLowerCase();
|
||||
switch(ubicacion){
|
||||
case "Bosque":
|
||||
case "bosque":
|
||||
if(vida >= 70){
|
||||
System.out.println("Te has encontrado un tesoro :-)");
|
||||
} else {
|
||||
@@ -35,7 +35,7 @@ void main() {
|
||||
vida -= 20;
|
||||
}
|
||||
break;
|
||||
case "Cueva":
|
||||
case "cueva":
|
||||
if(vida >= 50) {
|
||||
System.out.println("Has conseguido una espada!!");
|
||||
} else {
|
||||
@@ -43,7 +43,7 @@ void main() {
|
||||
vida -= 10;
|
||||
}
|
||||
break;
|
||||
case "Castillo":
|
||||
case "castillo":
|
||||
if(vida >= 80) {
|
||||
System.out.println("Puedes entrar");
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user