Development Discussion: Speeding up battle calculator (and thus Hard AI)
-
@LaFayette I tried using that in the PlayerType enum
BATTLE_TREE_AI("BattleTree (AI)", ClientSetting.showBetaFeatures.isSet()) { @Override public Player newPlayerWithName(final String name) { return new BattleTreeAi(name); } },But the player is still showing up in the list.
I also tried:
BATTLE_TREE_AI("BattleTree (AI)") { @Override public Player newPlayerWithName(final String name) { if (ClientSetting.showBetaFeatures.isSet()) { return new BattleTreeAi(name); } } }, -
@Trevan
Looks like @LaFayette trolled you a little bit there.
TryBATTLE_TREE_AI("BattleTree (AI)", ClientSetting.showBetaFeatures.getValue().orElse(false)) { @Override public Player newPlayerWithName(final String name) { return new BattleTreeAi(name); } },instead
-
@RoiEX That worked. I have to restart triplea for it to affect.
I tried to play a game in the UI since everything I've done has been through the test framework. But when I try to start a game, I get the error
Failed to start game IllegalArgumentExeption: File must exist at path: /.../game-headed/assets/unit_scroller/unit_sleep.pngI've checked and that file definitely doesn't exist. I've also checked out master and tried to run it in case my changes broke it but master also throws that same error.
Is there something I'm missing?
And should I create a PR now?
-
@Trevan are you using a specific IDE?
I think you have to run
./gradlew downloadAssetsbefore running the game in order to download all the default assets -
@RoiEX I'm using IntelliJ
-
And yes, you can create a PR whenever you like, it will take us a while to review it though
-
@Trevan If you're using intelliJ then it should automatically download the assets.
Try deleting theassetsand.assetsfolder and it should force a re-download -
@RoiEX It looks like IntelliJ is running that command but I ran it manually as well. I'm still getting that error. There are other files in
game-headed/assets/unit_scrollerso things have been downloaded. -
@RoiEX deleting the
assetsand.assetsfixed the issue. -
I've created a PR - https://github.com/triplea-game/triplea/pull/6501
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login