Add a somewhat hidden option in the UI to turn on simulation via a context menu on the AI radio button on desktop.

This allows choosing the AI mode without recompiling and also allows things like making a non-simulation AI play a simulation AI.
This commit is contained in:
Myrd
2015-02-07 18:32:02 +00:00
parent 4e1706ad22
commit 859a853499
7 changed files with 65 additions and 25 deletions

View File

@@ -1,5 +1,7 @@
package forge.player;
import java.util.Map;
import forge.GuiBase;
import forge.LobbyPlayer;
import forge.ai.AiProfileUtil;
@@ -46,7 +48,10 @@ public final class GamePlayerUtil {
return createAiPlayer(name, avatarCount == 0 ? 0 : MyRandom.getRandom().nextInt(avatarCount));
}
public final static LobbyPlayer createAiPlayer(String name, int avatarIndex) {
LobbyPlayerAi player = new LobbyPlayerAi(name);
return createAiPlayer(name, avatarIndex, null);
}
public final static LobbyPlayer createAiPlayer(String name, int avatarIndex, Map<String, String> options) {
LobbyPlayerAi player = new LobbyPlayerAi(name, options);
// TODO: implement specific AI profiles for quest mode.
String lastProfileChosen = FModel.getPreferences().getPref(FPref.UI_CURRENT_AI_PROFILE);