mirror of
https://github.com/Cpt-Adok/SNAKE.git
synced 2026-01-25 03:34:05 +00:00
correction de probleme
This commit is contained in:
@@ -3,7 +3,7 @@ package Item;
|
||||
/**
|
||||
* Cette enumération contient tout les items à effets disponnible dans le jeu.
|
||||
*/
|
||||
public enum Item {
|
||||
public enum Items {
|
||||
Mur("mur", Effects.IMPASSABLE),
|
||||
|
||||
FRAISE("fraise", Effects.INVINCIBILITY),
|
||||
@@ -13,15 +13,25 @@ public enum Item {
|
||||
private final String nom;
|
||||
private final Effects effect;
|
||||
|
||||
Item(String nom, Effects effects) {
|
||||
Items(String nom, Effects effects) {
|
||||
this.nom = nom;
|
||||
this.effect = effects;
|
||||
}
|
||||
|
||||
/**
|
||||
* * <p> type de variable pour recuperer le nom :
|
||||
* <pre><code>String name = Item.FRAISE.getName()</code></pre>
|
||||
* @return Avoir le nom de l'item
|
||||
*/
|
||||
public String getName() {
|
||||
return this.nom;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p> type de variable pour recuperer l'effet :
|
||||
* <pre><code>Effects effect = Item.FRAISE.getEffects()</code></pre>
|
||||
* @return Avoir l'effet de l'item
|
||||
*/
|
||||
public Effects getEffects() {
|
||||
return effect;
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
import Item.Items;
|
||||
import Personnages.*;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
String value = Items.FRAISE.getName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Personnages;
|
||||
|
||||
public class Player extends Characters {
|
||||
public class Player extends Personnage {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Personnages;
|
||||
|
||||
public class Robot extends Characters {
|
||||
public class Robot extends Personnage {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user