forked from fiuba/algo3_proyecto_base_tp2
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: mariagalindez <mgalindez@fi.uba.ar> Co-authored-by: SairBarreto <gbarreto@fi.uba.ar>
- Loading branch information
1 parent
8bbb71f
commit dee620a
Showing
9 changed files
with
67 additions
and
14 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package edu.fiuba.algo3.modelo; | ||
|
||
public interface Equipamiento { | ||
import edu.fiuba.algo3.modelo.Afectante; | ||
|
||
public interface Equipamiento extends Afectante { | ||
public Equipamiento mejorarEquipamiento(); | ||
} |
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
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,9 @@ | ||
package edu.fiuba.algo3.modelo.afectantes; | ||
|
||
import edu.fiuba.algo3.modelo.Afectante; | ||
import edu.fiuba.algo3.modelo.Jugador; | ||
public class Comida implements Afectante { | ||
public void afectar(Jugador jugador) { | ||
jugador.recibirEnergia(15); | ||
} | ||
} |
8 changes: 7 additions & 1 deletion
8
src/main/java/edu/fiuba/algo3/modelo/equipamientos/Armadura.java
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
package edu.fiuba.algo3.modelo.equipamientos; | ||
|
||
import edu.fiuba.algo3.modelo.Afectante; | ||
import edu.fiuba.algo3.modelo.Equipamiento; | ||
import edu.fiuba.algo3.modelo.Jugador; | ||
|
||
public class Armadura implements Equipamiento { | ||
public class Armadura implements Equipamiento, Afectante { | ||
public Equipamiento mejorarEquipamiento() { | ||
return new EscudoYEspada(); | ||
} | ||
|
||
public void afectar(Jugador jugador) { | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
package edu.fiuba.algo3.modelo.equipamientos; | ||
|
||
import edu.fiuba.algo3.modelo.Afectante; | ||
import edu.fiuba.algo3.modelo.Jugador; | ||
import edu.fiuba.algo3.modelo.Equipamiento; | ||
|
||
public class Casco implements Equipamiento { | ||
public class Casco implements Equipamiento, Afectante { | ||
public Equipamiento mejorarEquipamiento() { | ||
return new Armadura(); | ||
} | ||
|
||
public void afectar(Jugador jugador) { | ||
|
||
} | ||
} |
7 changes: 6 additions & 1 deletion
7
src/main/java/edu/fiuba/algo3/modelo/equipamientos/Desequipado.java
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package edu.fiuba.algo3.modelo.equipamientos; | ||
|
||
import edu.fiuba.algo3.modelo.Afectante; | ||
import edu.fiuba.algo3.modelo.Equipamiento; | ||
import edu.fiuba.algo3.modelo.Jugador; | ||
|
||
public class Desequipado implements Equipamiento { | ||
public class Desequipado implements Equipamiento, Afectante { | ||
public Equipamiento mejorarEquipamiento() { | ||
return new Casco(); | ||
} | ||
public void afectar(Jugador jugador) { | ||
|
||
} | ||
|
||
} |
8 changes: 7 additions & 1 deletion
8
src/main/java/edu/fiuba/algo3/modelo/equipamientos/EscudoYEspada.java
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
package edu.fiuba.algo3.modelo.equipamientos; | ||
|
||
import edu.fiuba.algo3.modelo.Afectante; | ||
import edu.fiuba.algo3.modelo.Equipamiento; | ||
import edu.fiuba.algo3.modelo.Jugador; | ||
|
||
public class EscudoYEspada implements Equipamiento { | ||
public class EscudoYEspada implements Equipamiento, Afectante { | ||
public Equipamiento mejorarEquipamiento() { | ||
return new Llave(); | ||
} | ||
|
||
public void afectar(Jugador jugador) { | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
package edu.fiuba.algo3.modelo.equipamientos; | ||
|
||
import edu.fiuba.algo3.modelo.Afectante; | ||
import edu.fiuba.algo3.modelo.Equipamiento; | ||
import edu.fiuba.algo3.modelo.Jugador; | ||
|
||
public class Llave implements Equipamiento { | ||
public class Llave implements Equipamiento, Afectante { | ||
public Equipamiento mejorarEquipamiento() { | ||
return this; | ||
} | ||
|
||
public void afectar(Jugador jugador) { | ||
|
||
} | ||
} |
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