Develop #1

Open
Ramtin wants to merge 35 commits from develop into main
2 changed files with 33 additions and 0 deletions
Showing only changes of commit 2e71767311 - Show all commits
@@ -0,0 +1,7 @@
package org.project.constants.gameConstant;
public enum PlayerRoles {
KNIGHT,
WIZARD,
ASSASSIN
}
@@ -0,0 +1,26 @@
package org.project.constants.gameConstant;
import org.project.entity.players.Assassin;
import org.project.entity.players.Knight;
import org.project.entity.players.Player;
import org.project.entity.players.Wizard;
public final class PlayerRolesExt {
private PlayerRolesExt() {}
public static Player CreatePlayer(PlayerRoles role, String name, int level) {
return switch (role) {
case KNIGHT -> new Knight(name, level);
case ASSASSIN -> new Assassin(name, level);
case WIZARD -> new Wizard(name, level);
};
}
public static Player CreatePlayer(PlayerRoles role, String name) {
return switch (role) {
case KNIGHT -> new Knight(name);
case ASSASSIN -> new Assassin(name);
case WIZARD -> new Wizard(name);
};
}
}