Add players' classes (dps, tank and support)

This commit is contained in:
Quentin Legot 2021-11-05 13:50:02 +01:00
parent 4ac571ad09
commit a2ebb5195c
2 changed files with 7 additions and 2 deletions

View File

@ -95,6 +95,9 @@ public class App extends Application {
playerClass = ComputerPlayer.class;
}
case "default" -> classPlayer = ClassPlayer.DEFAULT;
case "tank" -> classPlayer = ClassPlayer.TANK;
case "dps" -> classPlayer = ClassPlayer.DPS;
case "support" -> classPlayer = ClassPlayer.SUPPORT;
default -> throw new IllegalArgumentException("Unknown argument: " + str);
}
}

View File

@ -5,8 +5,10 @@ import fr.lnl.game.server.games.weapon.Weapon;
public enum ClassPlayer {
DEFAULT(800, 25, 40, 30, 40, 10, 800, 20, 20, 15, new Firearm());
DEFAULT(800, 25, 40, 30, 40, 10, 80, 20, 20, 15, new Firearm()),
TANK(1000, 20, 20, 17, 23, 13, 80, 27, 30, 22, new Firearm()),
DPS(800, 25, 16, 15, 20, 10, 80, 40, 40, 30, new Firearm()),
SUPPORT(600, 25, 20, 11, 15, 7, 80, 45, 45, 35, new Firearm());
private final int energy;
private final int shieldCost;
private final int shootCost;