Skip to content
Snippets Groups Projects
Commit 0af6da08 authored by Camille Okubo's avatar Camille Okubo
Browse files
parents b080c94f 3864fdec
No related branches found
No related tags found
No related merge requests found
package bitFight;
public interface Action {
public Action getActionType();
}
package bitFight; package bitFight;
public enum attack { public enum Attack implements Action {
PUNCH(10); PUNCH(10);
private int damage; private int damage;
...@@ -11,5 +11,11 @@ public enum attack { ...@@ -11,5 +11,11 @@ public enum attack {
return damage; return damage;
} }
public Action getActionType() {
return this;
}
public String getActionTypeToString() {
return "Attack";
}
} }
\ No newline at end of file
package bitFight;
public class Defense implements Action {
public Action getActionType() {
return this;
}
public String getActionTypeToString() {
return "Defense";
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment