diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..2d1c8e06 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.gradle/* +build/* +xcode/* + diff --git a/.project b/.project index 107b0a19..a200e031 100644 --- a/.project +++ b/.project @@ -1,12 +1,18 @@ - forge + mtg-forge-ios + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.buildship.core.gradleprojectnature diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..bf983fbd --- /dev/null +++ b/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,3 @@ +#Sat Sep 30 20:29:53 CEST 2017 +eclipse.preferences.version=1 +connection.project.dir= diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..6ee33dff --- /dev/null +++ b/build.gradle @@ -0,0 +1,140 @@ +buildscript { + + + repositories { + mavenLocal() + mavenCentral() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + jcenter() + } + dependencies { + classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1' + classpath 'org.multi-os-engine:moe-gradle:1.3.12' + + + } +} + +allprojects { + apply plugin: "eclipse" + apply plugin: "idea" + + version = '1.0' + ext { + appName = "mtg-forge-gradle" + gdxVersion = '1.9.6' + roboVMVersion = '2.3.1' + } + + repositories { + mavenLocal() + mavenCentral() + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + maven { url "https://oss.sonatype.org/content/repositories/releases/" } + } +} + +project(":forge-core") { + apply plugin: "java" + + + dependencies { + compile "com.badlogicgames.gdx:gdx:$gdxVersion" + + } +} + +project(":forge-ai") { + apply plugin: "java" + + + dependencies { + compile "com.badlogicgames.gdx:gdx:$gdxVersion" + + } +} + +project(":forge-gui") { + apply plugin: "java" + + + dependencies { + compile project(":forge-core") + compile "com.badlogicgames.gdx:gdx:$gdxVersion" + + } +} + +project(":forge-gui-desktop") { + apply plugin: "java" + + + dependencies { + compile project(":forge-core") + compile project(":forge-ai") + compile project(":forge-gui") + compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" + + } +} + +project(":forge-gui-mobile") { + apply plugin: "java" + + + dependencies { + compile project(":forge-core") + compile project(":forge-ai") + compile "com.badlogicgames.gdx:gdx:$gdxVersion" + compile "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion" + } +} + +project(":forge-gui-ios") { + apply plugin: "moe" + + configurations { natives } + + dependencies { + compile project(":forge-core") + compile project(":forge-ai") + compile project(":forge-gui-mobile") + compile "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion" + natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" + + } +} + +project(":ios-moe") { + apply plugin: "moe" + + configurations { natives } + + dependencies { + compile project(":forge-gui-mobile") + compile "com.badlogicgames.gdx:gdx-backend-moe:$gdxVersion" + natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" + + } +} + +project(":forge-gui-ios") { + apply plugin: "java" + apply plugin: "robovm" + + + dependencies { + compile project(":forge-gui-mobile") + compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion" + compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" + compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" + compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" + + } +} + + +tasks.eclipse.doLast { + delete ".project" +} \ No newline at end of file diff --git a/core/.classpath b/core/.classpath new file mode 100644 index 00000000..19fc2ea0 --- /dev/null +++ b/core/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/core/.gitignore b/core/.gitignore new file mode 100644 index 00000000..84c048a7 --- /dev/null +++ b/core/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/core/.project b/core/.project new file mode 100644 index 00000000..3f616339 --- /dev/null +++ b/core/.project @@ -0,0 +1,23 @@ + + + my-gdx-game-core + Project my-gdx-game-core created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/core/.settings/org.eclipse.buildship.core.prefs b/core/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..ad05a696 --- /dev/null +++ b/core/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 19:33:42 CEST 2017 +connection.project.dir=.. diff --git a/core/.settings/org.eclipse.jdt.core.prefs b/core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..b080d2dd --- /dev/null +++ b/core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/core/assets/badlogic.jpg b/core/assets/badlogic.jpg new file mode 100644 index 00000000..4390da6e Binary files /dev/null and b/core/assets/badlogic.jpg differ diff --git a/core/bin/com/mygdx/game/MyGdxGame.class b/core/bin/com/mygdx/game/MyGdxGame.class new file mode 100644 index 00000000..6acec3a3 Binary files /dev/null and b/core/bin/com/mygdx/game/MyGdxGame.class differ diff --git a/core/build.gradle b/core/build.gradle new file mode 100644 index 00000000..03cd1bea --- /dev/null +++ b/core/build.gradle @@ -0,0 +1,11 @@ +apply plugin: "java" + +sourceCompatibility = 1.6 +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + +sourceSets.main.java.srcDirs = [ "src/" ] + + +eclipse.project { + name = appName + "-core" +} diff --git a/core/src/com/mygdx/game/MyGdxGame.java b/core/src/com/mygdx/game/MyGdxGame.java new file mode 100644 index 00000000..61211847 --- /dev/null +++ b/core/src/com/mygdx/game/MyGdxGame.java @@ -0,0 +1,33 @@ +package com.mygdx.game; + +import com.badlogic.gdx.ApplicationAdapter; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; + +public class MyGdxGame extends ApplicationAdapter { + SpriteBatch batch; + Texture img; + + @Override + public void create () { + batch = new SpriteBatch(); + img = new Texture("badlogic.jpg"); + } + + @Override + public void render () { + Gdx.gl.glClearColor(1, 0, 0, 1); + Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); + batch.begin(); + batch.draw(img, 0, 0); + batch.end(); + } + + @Override + public void dispose () { + batch.dispose(); + img.dispose(); + } +} diff --git a/desktop/.classpath b/desktop/.classpath new file mode 100644 index 00000000..19fc2ea0 --- /dev/null +++ b/desktop/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/desktop/.project b/desktop/.project new file mode 100644 index 00000000..d5d6deba --- /dev/null +++ b/desktop/.project @@ -0,0 +1,36 @@ + + + mtg-forge-gradle-desktop + Project my-gdx-game-desktop created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + assets + 2 + PARENT-1-PROJECT_LOC/core/assets + + + + + copy_PARENT + $%7BPARENT-2-PROJECT_LOC%7D/Projects/mtg-forge-ios + + + diff --git a/desktop/.settings/org.eclipse.buildship.core.prefs b/desktop/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..80193782 --- /dev/null +++ b/desktop/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:07:13 CEST 2017 +connection.project.dir=.. diff --git a/desktop/.settings/org.eclipse.jdt.core.prefs b/desktop/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..b080d2dd --- /dev/null +++ b/desktop/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/desktop/bin/com/mygdx/game/desktop/DesktopLauncher.class b/desktop/bin/com/mygdx/game/desktop/DesktopLauncher.class new file mode 100644 index 00000000..5d5ec9dd Binary files /dev/null and b/desktop/bin/com/mygdx/game/desktop/DesktopLauncher.class differ diff --git a/desktop/build.gradle b/desktop/build.gradle new file mode 100644 index 00000000..68388923 --- /dev/null +++ b/desktop/build.gradle @@ -0,0 +1,55 @@ +apply plugin: "java" + +sourceCompatibility = 1.6 +sourceSets.main.java.srcDirs = [ "src/" ] + +project.ext.mainClassName = "com.mygdx.game.desktop.DesktopLauncher" +project.ext.assetsDir = new File("../core/assets"); + +task run(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true +} + +task debug(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true + debug = true +} + +task dist(type: Jar) { + from files(sourceSets.main.output.classesDir) + from files(sourceSets.main.output.resourcesDir) + from {configurations.compile.collect {zipTree(it)}} + from files(project.assetsDir); + + manifest { + attributes 'Main-Class': project.mainClassName + } +} + +dist.dependsOn classes + +eclipse { + project { + name = appName + "-desktop" + linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/core/assets' + } +} + +task afterEclipseImport(description: "Post processing after project generation", group: "IDE") { + doLast { + def classpath = new XmlParser().parse(file(".classpath")) + new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]); + def writer = new FileWriter(file(".classpath")) + def printer = new XmlNodePrinter(new PrintWriter(writer)) + printer.setPreserveWhitespace(true) + printer.print(classpath) + } +} diff --git a/desktop/src/com/mygdx/game/desktop/DesktopLauncher.java b/desktop/src/com/mygdx/game/desktop/DesktopLauncher.java new file mode 100644 index 00000000..fbf36ec0 --- /dev/null +++ b/desktop/src/com/mygdx/game/desktop/DesktopLauncher.java @@ -0,0 +1,12 @@ +package com.mygdx.game.desktop; + +import com.badlogic.gdx.backends.lwjgl.LwjglApplication; +import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; +import com.mygdx.game.MyGdxGame; + +public class DesktopLauncher { + public static void main (String[] arg) { + LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); + new LwjglApplication(new MyGdxGame(), config); + } +} diff --git a/forge-ai/.classpath b/forge-ai/.classpath index 51baab63..09d33be3 100644 --- a/forge-ai/.classpath +++ b/forge-ai/.classpath @@ -1,9 +1,9 @@ - - - - - - - - - \ No newline at end of file + + + + + + + + + diff --git a/forge-ai/.project b/forge-ai/.project index aab7576b..51975828 100644 --- a/forge-ai/.project +++ b/forge-ai/.project @@ -1,6 +1,6 @@ - forge-ai + mtg-forge-gradle-forge-ai @@ -10,6 +10,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.m2e.core.maven2Builder @@ -19,5 +24,6 @@ org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature + org.eclipse.buildship.core.gradleprojectnature diff --git a/forge-ai/.settings/org.eclipse.buildship.core.prefs b/forge-ai/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..cfe3ba86 --- /dev/null +++ b/forge-ai/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:29:54 CEST 2017 +connection.project.dir=.. diff --git a/forge-ai/.settings/org.eclipse.jdt.core.prefs b/forge-ai/.settings/org.eclipse.jdt.core.prefs index ec4300d5..60105c1b 100644 --- a/forge-ai/.settings/org.eclipse.jdt.core.prefs +++ b/forge-ai/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/forge-ai/build.gradle b/forge-ai/build.gradle new file mode 100644 index 00000000..11994c7e --- /dev/null +++ b/forge-ai/build.gradle @@ -0,0 +1,11 @@ +apply plugin: "java" + +sourceCompatibility = 1.6 +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + +sourceSets.main.java.srcDirs = [ "src/" ] + + +eclipse.project { + name = appName + "-forge-ai" +} diff --git a/forge-ai/target/classes/main/java/forge/ai/AIOption.class b/forge-ai/target/classes/main/java/forge/ai/AIOption.class new file mode 100644 index 00000000..77dddb99 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AIOption.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiAttackController.class b/forge-ai/target/classes/main/java/forge/ai/AiAttackController.class new file mode 100644 index 00000000..1e5ab1a0 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiAttackController.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiBlockController.class b/forge-ai/target/classes/main/java/forge/ai/AiBlockController.class new file mode 100644 index 00000000..7661ab09 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiBlockController.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiCardMemory$MemorySet.class b/forge-ai/target/classes/main/java/forge/ai/AiCardMemory$MemorySet.class new file mode 100644 index 00000000..f47f7d79 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiCardMemory$MemorySet.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiCardMemory.class b/forge-ai/target/classes/main/java/forge/ai/AiCardMemory.class new file mode 100644 index 00000000..bac29e5c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiCardMemory.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiController.class b/forge-ai/target/classes/main/java/forge/ai/AiController.class new file mode 100644 index 00000000..00a40ec8 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiController.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiCostDecision.class b/forge-ai/target/classes/main/java/forge/ai/AiCostDecision.class new file mode 100644 index 00000000..77982ef5 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiCostDecision.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiPlayDecision.class b/forge-ai/target/classes/main/java/forge/ai/AiPlayDecision.class new file mode 100644 index 00000000..240fa25b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiPlayDecision.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiPlayerPredicates.class b/forge-ai/target/classes/main/java/forge/ai/AiPlayerPredicates.class new file mode 100644 index 00000000..25a03f38 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiPlayerPredicates.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiProfileUtil.class b/forge-ai/target/classes/main/java/forge/ai/AiProfileUtil.class new file mode 100644 index 00000000..6609bc30 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiProfileUtil.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/AiProps.class b/forge-ai/target/classes/main/java/forge/ai/AiProps.class new file mode 100644 index 00000000..a7c8b3d6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/AiProps.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ComputerUtil.class b/forge-ai/target/classes/main/java/forge/ai/ComputerUtil.class new file mode 100644 index 00000000..0559e797 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ComputerUtil.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ComputerUtilAbility.class b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilAbility.class new file mode 100644 index 00000000..47cd9b17 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilAbility.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCard.class b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCard.class new file mode 100644 index 00000000..b2017d2b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCard.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCombat.class b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCombat.class new file mode 100644 index 00000000..4f7fd296 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCombat.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCost.class b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCost.class new file mode 100644 index 00000000..d2f8e3c8 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilCost.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ComputerUtilMana.class b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilMana.class new file mode 100644 index 00000000..3fab57d1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ComputerUtilMana.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/CreatureEvaluator.class b/forge-ai/target/classes/main/java/forge/ai/CreatureEvaluator.class new file mode 100644 index 00000000..e91b2e13 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/CreatureEvaluator.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/GameState.class b/forge-ai/target/classes/main/java/forge/ai/GameState.class new file mode 100644 index 00000000..f009fe34 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/GameState.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/LobbyPlayerAi.class b/forge-ai/target/classes/main/java/forge/ai/LobbyPlayerAi.class new file mode 100644 index 00000000..faa5bd1f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/LobbyPlayerAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/PlayerControllerAi.class b/forge-ai/target/classes/main/java/forge/ai/PlayerControllerAi.class new file mode 100644 index 00000000..740eed19 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/PlayerControllerAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$BlackLotus.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$BlackLotus.class new file mode 100644 index 00000000..9d32d2c3 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$BlackLotus.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$BondsOfFaith.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$BondsOfFaith.class new file mode 100644 index 00000000..c4d3f501 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$BondsOfFaith.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ChainOfAcid.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ChainOfAcid.class new file mode 100644 index 00000000..b3b33730 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ChainOfAcid.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ChainOfSmog.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ChainOfSmog.class new file mode 100644 index 00000000..34e870b1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ChainOfSmog.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$CursedScroll.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$CursedScroll.class new file mode 100644 index 00000000..06c62e24 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$CursedScroll.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$DeathgorgeScavenger.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$DeathgorgeScavenger.class new file mode 100644 index 00000000..1ba9fb34 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$DeathgorgeScavenger.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$DesecrationDemon.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$DesecrationDemon.class new file mode 100644 index 00000000..fe37a624 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$DesecrationDemon.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Donate.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Donate.class new file mode 100644 index 00000000..c2598681 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Donate.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ElectrostaticPummeler.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ElectrostaticPummeler.class new file mode 100644 index 00000000..ee11f138 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ElectrostaticPummeler.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ForceOfWill.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ForceOfWill.class new file mode 100644 index 00000000..46ff3ae1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$ForceOfWill.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$GuiltyConscience.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$GuiltyConscience.class new file mode 100644 index 00000000..234ddacb Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$GuiltyConscience.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Intuition.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Intuition.class new file mode 100644 index 00000000..dd59bc17 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Intuition.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$LivingDeath.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$LivingDeath.class new file mode 100644 index 00000000..f8e80697 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$LivingDeath.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$MairsilThePretender.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$MairsilThePretender.class new file mode 100644 index 00000000..8b2aebce Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$MairsilThePretender.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$MomirVigAvatar.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$MomirVigAvatar.class new file mode 100644 index 00000000..413ef5f4 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$MomirVigAvatar.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Necropotence.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Necropotence.class new file mode 100644 index 00000000..da9db472 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Necropotence.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$NullBrooch.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$NullBrooch.class new file mode 100644 index 00000000..d1ad331e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$NullBrooch.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$NykthosShrineToNyx.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$NykthosShrineToNyx.class new file mode 100644 index 00000000..c196c7c2 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$NykthosShrineToNyx.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$PhyrexianDreadnought.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$PhyrexianDreadnought.class new file mode 100644 index 00000000..90885cf0 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$PhyrexianDreadnought.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$SarkhanTheMad.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$SarkhanTheMad.class new file mode 100644 index 00000000..c8bcc2bd Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$SarkhanTheMad.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$SurvivalOfTheFittest.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$SurvivalOfTheFittest.class new file mode 100644 index 00000000..787daab9 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$SurvivalOfTheFittest.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Timetwister.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Timetwister.class new file mode 100644 index 00000000..fc856832 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$Timetwister.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$UginTheSpiritDragon.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$UginTheSpiritDragon.class new file mode 100644 index 00000000..09940aba Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$UginTheSpiritDragon.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$VolrathsShapeshifter.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$VolrathsShapeshifter.class new file mode 100644 index 00000000..f75424f6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$VolrathsShapeshifter.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$YawgmothsBargain.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$YawgmothsBargain.class new file mode 100644 index 00000000..83a1e4af Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$YawgmothsBargain.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$YawgmothsWill.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$YawgmothsWill.class new file mode 100644 index 00000000..a9be763e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi$YawgmothsWill.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi.class b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi.class new file mode 100644 index 00000000..947efc48 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpecialCardAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpellAbilityAi.class b/forge-ai/target/classes/main/java/forge/ai/SpellAbilityAi.class new file mode 100644 index 00000000..ba011828 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpellAbilityAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/SpellApiToAi.class b/forge-ai/target/classes/main/java/forge/ai/SpellApiToAi.class new file mode 100644 index 00000000..72e21db3 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/SpellApiToAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ActivateAbilityAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ActivateAbilityAi.class new file mode 100644 index 00000000..3c0088a6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ActivateAbilityAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/AddPhaseAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/AddPhaseAi.class new file mode 100644 index 00000000..d67e281d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/AddPhaseAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/AddTurnAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/AddTurnAi.class new file mode 100644 index 00000000..f9e8bb1d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/AddTurnAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/AlwaysPlayAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/AlwaysPlayAi.class new file mode 100644 index 00000000..8cbc8503 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/AlwaysPlayAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/AnimateAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/AnimateAi.class new file mode 100644 index 00000000..708b0dff Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/AnimateAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/AnimateAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/AnimateAllAi.class new file mode 100644 index 00000000..f0991a8b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/AnimateAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/AttachAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/AttachAi.class new file mode 100644 index 00000000..bcbf5317 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/AttachAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/BalanceAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/BalanceAi.class new file mode 100644 index 00000000..ef2c65e1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/BalanceAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/BecomesBlockedAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/BecomesBlockedAi.class new file mode 100644 index 00000000..8e5378cf Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/BecomesBlockedAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/BidLifeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/BidLifeAi.class new file mode 100644 index 00000000..3d3b1984 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/BidLifeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/BondAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/BondAi.class new file mode 100644 index 00000000..f7760491 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/BondAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CanPlayAsDrawbackAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CanPlayAsDrawbackAi.class new file mode 100644 index 00000000..5ad48efb Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CanPlayAsDrawbackAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CannotPlayAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CannotPlayAi.class new file mode 100644 index 00000000..cc4a159c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CannotPlayAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChangeTargetsAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChangeTargetsAi.class new file mode 100644 index 00000000..b8e8eb91 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChangeTargetsAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChangeZoneAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChangeZoneAi.class new file mode 100644 index 00000000..db73c1e1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChangeZoneAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChangeZoneAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChangeZoneAllAi.class new file mode 100644 index 00000000..5a5858be Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChangeZoneAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CharmAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CharmAi.class new file mode 100644 index 00000000..fc98c34c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CharmAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseCardAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseCardAi.class new file mode 100644 index 00000000..1bbfd4f1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseCardAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseCardNameAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseCardNameAi.class new file mode 100644 index 00000000..417bccae Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseCardNameAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseColorAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseColorAi.class new file mode 100644 index 00000000..1a6ff2bd Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseColorAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseDirectionAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseDirectionAi.class new file mode 100644 index 00000000..e331aa69 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseDirectionAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseGenericEffectAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseGenericEffectAi.class new file mode 100644 index 00000000..0b8a8e32 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseGenericEffectAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseNumberAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseNumberAi.class new file mode 100644 index 00000000..89bc4a74 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseNumberAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChoosePlayerAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChoosePlayerAi.class new file mode 100644 index 00000000..e730c588 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChoosePlayerAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseSourceAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseSourceAi.class new file mode 100644 index 00000000..e2bb8061 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseSourceAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ChooseTypeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseTypeAi.class new file mode 100644 index 00000000..4bd72ead Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ChooseTypeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ClashAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ClashAi.class new file mode 100644 index 00000000..a293fdc1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ClashAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CloneAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CloneAi.class new file mode 100644 index 00000000..59158f16 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CloneAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ControlExchangeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ControlExchangeAi.class new file mode 100644 index 00000000..79118448 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ControlExchangeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ControlGainAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ControlGainAi.class new file mode 100644 index 00000000..14b7ab63 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ControlGainAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CopyPermanentAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CopyPermanentAi.class new file mode 100644 index 00000000..84f3460f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CopyPermanentAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CopySpellAbilityAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CopySpellAbilityAi.class new file mode 100644 index 00000000..d83d29a4 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CopySpellAbilityAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CounterAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CounterAi.class new file mode 100644 index 00000000..f8d64793 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CounterAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersAi.class new file mode 100644 index 00000000..ae75d415 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersMoveAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersMoveAi.class new file mode 100644 index 00000000..8f15a06f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersMoveAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersMultiplyAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersMultiplyAi.class new file mode 100644 index 00000000..6c10dd2c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersMultiplyAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersProliferateAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersProliferateAi.class new file mode 100644 index 00000000..ba7d78b6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersProliferateAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutAi.class new file mode 100644 index 00000000..f23465f1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutAllAi.class new file mode 100644 index 00000000..72a0ab5e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutOrRemoveAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutOrRemoveAi.class new file mode 100644 index 00000000..f03e65a9 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersPutOrRemoveAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/CountersRemoveAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/CountersRemoveAi.class new file mode 100644 index 00000000..fc31d8f1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/CountersRemoveAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DamageAiBase.class b/forge-ai/target/classes/main/java/forge/ai/ability/DamageAiBase.class new file mode 100644 index 00000000..338002d2 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DamageAiBase.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DamageAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DamageAllAi.class new file mode 100644 index 00000000..dd2afa32 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DamageAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DamageDealAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DamageDealAi.class new file mode 100644 index 00000000..13c6e54c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DamageDealAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DamageEachAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DamageEachAi.class new file mode 100644 index 00000000..c62218a0 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DamageEachAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DamagePreventAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DamagePreventAi.class new file mode 100644 index 00000000..e842334b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DamagePreventAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DamagePreventAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DamagePreventAllAi.class new file mode 100644 index 00000000..1168e419 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DamagePreventAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DebuffAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DebuffAi.class new file mode 100644 index 00000000..c7958c2d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DebuffAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DelayedTriggerAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DelayedTriggerAi.class new file mode 100644 index 00000000..26d726e6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DelayedTriggerAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DestroyAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DestroyAi.class new file mode 100644 index 00000000..04f264fc Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DestroyAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DestroyAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DestroyAllAi.class new file mode 100644 index 00000000..28b437ea Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DestroyAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DigAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DigAi.class new file mode 100644 index 00000000..e71eaccc Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DigAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DigUntilAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DigUntilAi.class new file mode 100644 index 00000000..c51ec42c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DigUntilAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DiscardAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DiscardAi.class new file mode 100644 index 00000000..6337488f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DiscardAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DrainManaAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DrainManaAi.class new file mode 100644 index 00000000..145e69f8 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DrainManaAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/DrawAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/DrawAi.class new file mode 100644 index 00000000..fede6447 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/DrawAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/EffectAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/EffectAi.class new file mode 100644 index 00000000..0a2f4f5b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/EffectAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/EncodeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/EncodeAi.class new file mode 100644 index 00000000..f25685ca Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/EncodeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/EndTurnAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/EndTurnAi.class new file mode 100644 index 00000000..18370eb4 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/EndTurnAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ExploreAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ExploreAi.class new file mode 100644 index 00000000..13ce050c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ExploreAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/FightAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/FightAi.class new file mode 100644 index 00000000..fb6abb89 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/FightAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/FlipACoinAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/FlipACoinAi.class new file mode 100644 index 00000000..4177b1e1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/FlipACoinAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/FogAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/FogAi.class new file mode 100644 index 00000000..5052c2a6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/FogAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/GameLossAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/GameLossAi.class new file mode 100644 index 00000000..4799238e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/GameLossAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/GameWinAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/GameWinAi.class new file mode 100644 index 00000000..fbae9357 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/GameWinAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/GoadAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/GoadAi.class new file mode 100644 index 00000000..bd31c72b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/GoadAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/HauntAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/HauntAi.class new file mode 100644 index 00000000..3eeaf11b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/HauntAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/LegendaryRuleAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/LegendaryRuleAi.class new file mode 100644 index 00000000..09477a00 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/LegendaryRuleAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/LifeExchangeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/LifeExchangeAi.class new file mode 100644 index 00000000..38b18c35 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/LifeExchangeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/LifeGainAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/LifeGainAi.class new file mode 100644 index 00000000..8e2e73b9 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/LifeGainAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/LifeLoseAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/LifeLoseAi.class new file mode 100644 index 00000000..75f2435c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/LifeLoseAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/LifeSetAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/LifeSetAi.class new file mode 100644 index 00000000..aa16cc13 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/LifeSetAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ManaEffectAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ManaEffectAi.class new file mode 100644 index 00000000..b0665a3f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ManaEffectAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ManifestAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ManifestAi.class new file mode 100644 index 00000000..ca85bfde Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ManifestAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/MeldAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/MeldAi.class new file mode 100644 index 00000000..68fb9052 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/MeldAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/MillAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/MillAi.class new file mode 100644 index 00000000..9271e028 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/MillAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/MustAttackAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/MustAttackAi.class new file mode 100644 index 00000000..a231c091 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/MustAttackAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/MustBlockAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/MustBlockAi.class new file mode 100644 index 00000000..9989d050 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/MustBlockAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PeekAndRevealAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PeekAndRevealAi.class new file mode 100644 index 00000000..54bead6b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PeekAndRevealAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PermanentAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PermanentAi.class new file mode 100644 index 00000000..23b93a8f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PermanentAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PermanentCreatureAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PermanentCreatureAi.class new file mode 100644 index 00000000..3743c42d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PermanentCreatureAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PermanentNoncreatureAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PermanentNoncreatureAi.class new file mode 100644 index 00000000..342fe87d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PermanentNoncreatureAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PhasesAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PhasesAi.class new file mode 100644 index 00000000..698b157e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PhasesAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PlayAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PlayAi.class new file mode 100644 index 00000000..677040a3 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PlayAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PoisonAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PoisonAi.class new file mode 100644 index 00000000..061ec111 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PoisonAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PowerExchangeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PowerExchangeAi.class new file mode 100644 index 00000000..d8acfb0d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PowerExchangeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ProtectAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ProtectAi.class new file mode 100644 index 00000000..eae5a9c9 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ProtectAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ProtectAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ProtectAllAi.class new file mode 100644 index 00000000..d2648dc4 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ProtectAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PumpAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PumpAi.class new file mode 100644 index 00000000..03741b2c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PumpAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PumpAiBase.class b/forge-ai/target/classes/main/java/forge/ai/ability/PumpAiBase.class new file mode 100644 index 00000000..6b1711e1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PumpAiBase.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/PumpAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/PumpAllAi.class new file mode 100644 index 00000000..ba4cb0a9 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/PumpAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RearrangeTopOfLibraryAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RearrangeTopOfLibraryAi.class new file mode 100644 index 00000000..18debb04 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RearrangeTopOfLibraryAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RegenerateAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RegenerateAi.class new file mode 100644 index 00000000..851f7e3a Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RegenerateAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RegenerateAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RegenerateAllAi.class new file mode 100644 index 00000000..f37fdff0 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RegenerateAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RemoveFromCombatAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RemoveFromCombatAi.class new file mode 100644 index 00000000..67ced037 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RemoveFromCombatAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RepeatAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RepeatAi.class new file mode 100644 index 00000000..5f484453 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RepeatAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RepeatEachAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RepeatEachAi.class new file mode 100644 index 00000000..bc73fb0c Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RepeatEachAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RestartGameAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RestartGameAi.class new file mode 100644 index 00000000..9ca717fb Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RestartGameAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RevealAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RevealAi.class new file mode 100644 index 00000000..7d4f732e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RevealAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RevealAiBase.class b/forge-ai/target/classes/main/java/forge/ai/ability/RevealAiBase.class new file mode 100644 index 00000000..c7671348 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RevealAiBase.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RevealHandAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RevealHandAi.class new file mode 100644 index 00000000..2d0dfa20 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RevealHandAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/RollPlanarDiceAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/RollPlanarDiceAi.class new file mode 100644 index 00000000..e94f686b Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/RollPlanarDiceAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/SacrificeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/SacrificeAi.class new file mode 100644 index 00000000..3c38be82 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/SacrificeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/SacrificeAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/SacrificeAllAi.class new file mode 100644 index 00000000..cd15fe30 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/SacrificeAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ScryAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ScryAi.class new file mode 100644 index 00000000..b216a1d8 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ScryAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/SetStateAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/SetStateAi.class new file mode 100644 index 00000000..8d0c984f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/SetStateAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ShuffleAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ShuffleAi.class new file mode 100644 index 00000000..2a061624 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ShuffleAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/SkipTurnAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/SkipTurnAi.class new file mode 100644 index 00000000..a4b45b8d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/SkipTurnAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/StoreMapAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/StoreMapAi.class new file mode 100644 index 00000000..783c5d51 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/StoreMapAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/StoreSVarAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/StoreSVarAi.class new file mode 100644 index 00000000..b55d1c6e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/StoreSVarAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/TapAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/TapAi.class new file mode 100644 index 00000000..836d5b95 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/TapAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/TapAiBase.class b/forge-ai/target/classes/main/java/forge/ai/ability/TapAiBase.class new file mode 100644 index 00000000..1e12e7aa Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/TapAiBase.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/TapAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/TapAllAi.class new file mode 100644 index 00000000..752fc1a0 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/TapAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/TapOrUntapAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/TapOrUntapAi.class new file mode 100644 index 00000000..ad478af3 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/TapOrUntapAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/TapOrUntapAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/TapOrUntapAllAi.class new file mode 100644 index 00000000..9d7cacc1 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/TapOrUntapAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/TokenAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/TokenAi.class new file mode 100644 index 00000000..4fa97e41 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/TokenAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/TwoPilesAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/TwoPilesAi.class new file mode 100644 index 00000000..2465a67e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/TwoPilesAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/UnattachAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/UnattachAllAi.class new file mode 100644 index 00000000..d2e40a87 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/UnattachAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/UntapAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/UntapAi.class new file mode 100644 index 00000000..dfd9f858 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/UntapAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/UntapAllAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/UntapAllAi.class new file mode 100644 index 00000000..1e3dd755 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/UntapAllAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/VoteAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/VoteAi.class new file mode 100644 index 00000000..04f80469 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/VoteAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/ability/ZoneExchangeAi.class b/forge-ai/target/classes/main/java/forge/ai/ability/ZoneExchangeAi.class new file mode 100644 index 00000000..ed9dfe20 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/ability/ZoneExchangeAi.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/GameCopier$CopiedGameObjectMap.class b/forge-ai/target/classes/main/java/forge/ai/simulation/GameCopier$CopiedGameObjectMap.class new file mode 100644 index 00000000..e68cc504 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/GameCopier$CopiedGameObjectMap.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/GameCopier.class b/forge-ai/target/classes/main/java/forge/ai/simulation/GameCopier.class new file mode 100644 index 00000000..7ac1e7eb Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/GameCopier.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/GameSimulator.class b/forge-ai/target/classes/main/java/forge/ai/simulation/GameSimulator.class new file mode 100644 index 00000000..54967534 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/GameSimulator.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$CombatSimResult.class b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$CombatSimResult.class new file mode 100644 index 00000000..4d142fd7 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$CombatSimResult.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$Score.class b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$Score.class new file mode 100644 index 00000000..0bc4720f Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$Score.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$SimulationCreatureEvaluator.class b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$SimulationCreatureEvaluator.class new file mode 100644 index 00000000..c543cba6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator$SimulationCreatureEvaluator.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator.class b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator.class new file mode 100644 index 00000000..0e7433c9 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/GameStateEvaluator.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/MultiTargetSelector$Targets.class b/forge-ai/target/classes/main/java/forge/ai/simulation/MultiTargetSelector$Targets.class new file mode 100644 index 00000000..08369aaa Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/MultiTargetSelector$Targets.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/MultiTargetSelector.class b/forge-ai/target/classes/main/java/forge/ai/simulation/MultiTargetSelector.class new file mode 100644 index 00000000..ee82a71e Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/MultiTargetSelector.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/Plan$Decision.class b/forge-ai/target/classes/main/java/forge/ai/simulation/Plan$Decision.class new file mode 100644 index 00000000..225348b6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/Plan$Decision.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/Plan$SpellAbilityRef.class b/forge-ai/target/classes/main/java/forge/ai/simulation/Plan$SpellAbilityRef.class new file mode 100644 index 00000000..b777ac87 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/Plan$SpellAbilityRef.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/Plan.class b/forge-ai/target/classes/main/java/forge/ai/simulation/Plan.class new file mode 100644 index 00000000..f45438c2 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/Plan.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector$SimilarTargetSkipper.class b/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector$SimilarTargetSkipper.class new file mode 100644 index 00000000..ce5dc8bb Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector$SimilarTargetSkipper.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector$Targets.class b/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector$Targets.class new file mode 100644 index 00000000..8621b197 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector$Targets.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector.class b/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector.class new file mode 100644 index 00000000..fb623a11 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/PossibleTargetSelector.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/SimulationController$CachedEffect.class b/forge-ai/target/classes/main/java/forge/ai/simulation/SimulationController$CachedEffect.class new file mode 100644 index 00000000..1fea7c13 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/SimulationController$CachedEffect.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/SimulationController.class b/forge-ai/target/classes/main/java/forge/ai/simulation/SimulationController.class new file mode 100644 index 00000000..69585b41 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/SimulationController.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator$AllowRepeatModesIterator.class b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator$AllowRepeatModesIterator.class new file mode 100644 index 00000000..32f636a6 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator$AllowRepeatModesIterator.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator$ChoicePoint.class b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator$ChoicePoint.class new file mode 100644 index 00000000..d9d56fac Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator$ChoicePoint.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator.class b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator.class new file mode 100644 index 00000000..8088f59d Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityChoicesIterator.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityPicker$PlayLandAbility.class b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityPicker$PlayLandAbility.class new file mode 100644 index 00000000..aa0b70a8 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityPicker$PlayLandAbility.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityPicker.class b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityPicker.class new file mode 100644 index 00000000..0e7cb345 Binary files /dev/null and b/forge-ai/target/classes/main/java/forge/ai/simulation/SpellAbilityPicker.class differ diff --git a/forge-ai/target/classes/main/java/forge/ai/simulation/TODO.txt b/forge-ai/target/classes/main/java/forge/ai/simulation/TODO.txt new file mode 100644 index 00000000..a7d06f2d --- /dev/null +++ b/forge-ai/target/classes/main/java/forge/ai/simulation/TODO.txt @@ -0,0 +1,28 @@ +High-level TODOs for AI simulation code: + + - When copying the game and simulating, copy what's on the stack. This will + allow AI to use effects that e.g. sacrifice their creatures that are targeted + by removal as well as play counterspells using the simulation framework. + + - When evaluating permanents with ETB effects (e.g. oblivion ring), simulate + all possible targets, just like SA targeting during simulation. + + - When evaluating what to play during combat, simulate until end of combat, so + that the AI takes into account how much life or chump blockers are saved when + killing an attacking creature, for example. + + - When evaluating game state, creature evaluations should take into account the + current turn and phase and what creatures the opponent has - so that for e.g. + if the opponent can kill you next turn with enough attacking creatures, then + effects that produce blockers are rated higher. + + - AI is too eager to play spells. For example, the AI may want to play an instant + during draw phase, since that's the best spell to play at that point, whereas + in reality, waiting till MAIN1 and playing a creature or sorcery may be the + better decision. + + - AI needs to ration mana somehow. Right now, it's a "greedy play best spell" + system. It fails to take into account situations where playing two cheap + spells is a better alternative than playing one expensive spell whose effect + is better than each cheap spell, but not than both of them. + diff --git a/forge-core/.classpath b/forge-core/.classpath index 2b0355ca..09d33be3 100644 --- a/forge-core/.classpath +++ b/forge-core/.classpath @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/forge-core/.project b/forge-core/.project index 134e5f60..a2b2c851 100644 --- a/forge-core/.project +++ b/forge-core/.project @@ -1,6 +1,6 @@ - forge-core + mtg-forge-gradle-forge-core @@ -10,6 +10,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.m2e.core.maven2Builder @@ -19,5 +24,6 @@ org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature + org.eclipse.buildship.core.gradleprojectnature diff --git a/forge-core/.settings/org.eclipse.buildship.core.prefs b/forge-core/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..922a46ff --- /dev/null +++ b/forge-core/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,3 @@ +#Sat Sep 30 20:29:54 CEST 2017 +eclipse.preferences.version=1 +connection.project.dir=.. diff --git a/forge-core/.settings/org.eclipse.jdt.core.prefs b/forge-core/.settings/org.eclipse.jdt.core.prefs index ec4300d5..60105c1b 100644 --- a/forge-core/.settings/org.eclipse.jdt.core.prefs +++ b/forge-core/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/forge-core/build.gradle b/forge-core/build.gradle new file mode 100644 index 00000000..e39d7e41 --- /dev/null +++ b/forge-core/build.gradle @@ -0,0 +1,11 @@ +apply plugin: "java" + +sourceCompatibility = 1.6 +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + +sourceSets.main.java.srcDirs = [ "src/" ] + + +eclipse.project { + name = appName + "-forge-core" +} diff --git a/forge-core/target/classes/main/java/forge/CardStorageReader$ProgressObserver.class b/forge-core/target/classes/main/java/forge/CardStorageReader$ProgressObserver.class new file mode 100644 index 00000000..4a9c7fe1 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/CardStorageReader$ProgressObserver.class differ diff --git a/forge-core/target/classes/main/java/forge/CardStorageReader.class b/forge-core/target/classes/main/java/forge/CardStorageReader.class new file mode 100644 index 00000000..a53f1cf8 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/CardStorageReader.class differ diff --git a/forge-core/target/classes/main/java/forge/FTrace.class b/forge-core/target/classes/main/java/forge/FTrace.class new file mode 100644 index 00000000..7b7a1883 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/FTrace.class differ diff --git a/forge-core/target/classes/main/java/forge/ImageKeys.class b/forge-core/target/classes/main/java/forge/ImageKeys.class new file mode 100644 index 00000000..f6dcabaa Binary files /dev/null and b/forge-core/target/classes/main/java/forge/ImageKeys.class differ diff --git a/forge-core/target/classes/main/java/forge/LobbyPlayer.class b/forge-core/target/classes/main/java/forge/LobbyPlayer.class new file mode 100644 index 00000000..1e17e779 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/LobbyPlayer.class differ diff --git a/forge-core/target/classes/main/java/forge/StaticData.class b/forge-core/target/classes/main/java/forge/StaticData.class new file mode 100644 index 00000000..7e90b838 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/StaticData.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardAiHints.class b/forge-core/target/classes/main/java/forge/card/CardAiHints.class new file mode 100644 index 00000000..1e78dc17 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardAiHints.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardChangedType.class b/forge-core/target/classes/main/java/forge/card/CardChangedType.class new file mode 100644 index 00000000..7355ea8b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardChangedType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardDb$CardRequest.class b/forge-core/target/classes/main/java/forge/card/CardDb$CardRequest.class new file mode 100644 index 00000000..90ce188b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardDb$CardRequest.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardDb$Editor.class b/forge-core/target/classes/main/java/forge/card/CardDb$Editor.class new file mode 100644 index 00000000..0c5b0dac Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardDb$Editor.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardDb$PredicateExistsInSets.class b/forge-core/target/classes/main/java/forge/card/CardDb$PredicateExistsInSets.class new file mode 100644 index 00000000..808e6309 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardDb$PredicateExistsInSets.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardDb$SetPreference.class b/forge-core/target/classes/main/java/forge/card/CardDb$SetPreference.class new file mode 100644 index 00000000..ed0ede4a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardDb$SetPreference.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardDb.class b/forge-core/target/classes/main/java/forge/card/CardDb.class new file mode 100644 index 00000000..520b8f0e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardDb.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$CardInSet.class b/forge-core/target/classes/main/java/forge/card/CardEdition$CardInSet.class new file mode 100644 index 00000000..ec9b01ac Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$CardInSet.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Collection.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Collection.class new file mode 100644 index 00000000..fed8405c Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Collection.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$FoilType.class b/forge-core/target/classes/main/java/forge/card/CardEdition$FoilType.class new file mode 100644 index 00000000..87369b14 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$FoilType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeBooster.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeBooster.class new file mode 100644 index 00000000..11fcb65f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeBooster.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeBoosterBox.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeBoosterBox.class new file mode 100644 index 00000000..7532645f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeBoosterBox.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeFatPack.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeFatPack.class new file mode 100644 index 00000000..685db1b3 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeFatPack.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeStarter.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeStarter.class new file mode 100644 index 00000000..cae4752f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates$CanMakeStarter.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates.class new file mode 100644 index 00000000..8e23709c Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Predicates.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Reader.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Reader.class new file mode 100644 index 00000000..74084c3a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Reader.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition$Type.class b/forge-core/target/classes/main/java/forge/card/CardEdition$Type.class new file mode 100644 index 00000000..50a82f71 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition$Type.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardEdition.class b/forge-core/target/classes/main/java/forge/card/CardEdition.class new file mode 100644 index 00000000..6b9b658e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardEdition.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardFace$FaceSelectionMethod.class b/forge-core/target/classes/main/java/forge/card/CardFace$FaceSelectionMethod.class new file mode 100644 index 00000000..b41cac10 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardFace$FaceSelectionMethod.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardFace.class b/forge-core/target/classes/main/java/forge/card/CardFace.class new file mode 100644 index 00000000..c2fae3c2 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardFace.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardFacePredicates$PredicateCoreType.class b/forge-core/target/classes/main/java/forge/card/CardFacePredicates$PredicateCoreType.class new file mode 100644 index 00000000..2b13c854 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardFacePredicates$PredicateCoreType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardFacePredicates$PredicateSuperType.class b/forge-core/target/classes/main/java/forge/card/CardFacePredicates$PredicateSuperType.class new file mode 100644 index 00000000..cb444c53 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardFacePredicates$PredicateSuperType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardFacePredicates$Presets.class b/forge-core/target/classes/main/java/forge/card/CardFacePredicates$Presets.class new file mode 100644 index 00000000..dba097f5 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardFacePredicates$Presets.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardFacePredicates.class b/forge-core/target/classes/main/java/forge/card/CardFacePredicates.class new file mode 100644 index 00000000..a14977bf Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardFacePredicates.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRarity.class b/forge-core/target/classes/main/java/forge/card/CardRarity.class new file mode 100644 index 00000000..675d8f77 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRarity.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRules$Reader$ManaCostParser.class b/forge-core/target/classes/main/java/forge/card/CardRules$Reader$ManaCostParser.class new file mode 100644 index 00000000..af32def5 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRules$Reader$ManaCostParser.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRules$Reader.class b/forge-core/target/classes/main/java/forge/card/CardRules$Reader.class new file mode 100644 index 00000000..f9d9142e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRules$Reader.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRules.class b/forge-core/target/classes/main/java/forge/card/CardRules.class new file mode 100644 index 00000000..99bc0a24 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRules.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafColor$ColorOperator.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafColor$ColorOperator.class new file mode 100644 index 00000000..3da76030 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafColor$ColorOperator.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafColor.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafColor.class new file mode 100644 index 00000000..5726ae3a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafColor.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafNumber$CardField.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafNumber$CardField.class new file mode 100644 index 00000000..6b95d60a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafNumber$CardField.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafNumber.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafNumber.class new file mode 100644 index 00000000..f052f5d7 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafNumber.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafString$CardField.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafString$CardField.class new file mode 100644 index 00000000..57d1f076 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafString$CardField.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafString.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafString.class new file mode 100644 index 00000000..4b8206f1 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$LeafString.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateCoreType.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateCoreType.class new file mode 100644 index 00000000..11cf3305 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateCoreType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateSplitType.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateSplitType.class new file mode 100644 index 00000000..bd145301 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateSplitType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateSuperType.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateSuperType.class new file mode 100644 index 00000000..57541bed Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$PredicateSuperType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$Presets.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$Presets.class new file mode 100644 index 00000000..fa87b9c0 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates$Presets.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardRulesPredicates.class b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates.class new file mode 100644 index 00000000..4c08132e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardRulesPredicates.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardSplitType.class b/forge-core/target/classes/main/java/forge/card/CardSplitType.class new file mode 100644 index 00000000..2ad41a0a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardSplitType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardStateName.class b/forge-core/target/classes/main/java/forge/card/CardStateName.class new file mode 100644 index 00000000..85164c52 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardStateName.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardType$Constant.class b/forge-core/target/classes/main/java/forge/card/CardType$Constant.class new file mode 100644 index 00000000..04e6f2d4 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardType$Constant.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardType$CoreType.class b/forge-core/target/classes/main/java/forge/card/CardType$CoreType.class new file mode 100644 index 00000000..748e1c6b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardType$CoreType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardType$Supertype.class b/forge-core/target/classes/main/java/forge/card/CardType$Supertype.class new file mode 100644 index 00000000..e4683404 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardType$Supertype.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardType.class b/forge-core/target/classes/main/java/forge/card/CardType.class new file mode 100644 index 00000000..37f00f5d Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardType.class differ diff --git a/forge-core/target/classes/main/java/forge/card/CardTypeView.class b/forge-core/target/classes/main/java/forge/card/CardTypeView.class new file mode 100644 index 00000000..d80f939a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/CardTypeView.class differ diff --git a/forge-core/target/classes/main/java/forge/card/ColorSet$ColorIterator.class b/forge-core/target/classes/main/java/forge/card/ColorSet$ColorIterator.class new file mode 100644 index 00000000..41b7d114 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/ColorSet$ColorIterator.class differ diff --git a/forge-core/target/classes/main/java/forge/card/ColorSet.class b/forge-core/target/classes/main/java/forge/card/ColorSet.class new file mode 100644 index 00000000..2e0bbca6 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/ColorSet.class differ diff --git a/forge-core/target/classes/main/java/forge/card/DeckHints$Type.class b/forge-core/target/classes/main/java/forge/card/DeckHints$Type.class new file mode 100644 index 00000000..5f41ab1b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/DeckHints$Type.class differ diff --git a/forge-core/target/classes/main/java/forge/card/DeckHints.class b/forge-core/target/classes/main/java/forge/card/DeckHints.class new file mode 100644 index 00000000..b4e99ea1 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/DeckHints.class differ diff --git a/forge-core/target/classes/main/java/forge/card/ICardCharacteristics.class b/forge-core/target/classes/main/java/forge/card/ICardCharacteristics.class new file mode 100644 index 00000000..8f174a00 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/ICardCharacteristics.class differ diff --git a/forge-core/target/classes/main/java/forge/card/ICardDatabase.class b/forge-core/target/classes/main/java/forge/card/ICardDatabase.class new file mode 100644 index 00000000..5923db0c Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/ICardDatabase.class differ diff --git a/forge-core/target/classes/main/java/forge/card/ICardFace.class b/forge-core/target/classes/main/java/forge/card/ICardFace.class new file mode 100644 index 00000000..eff82d94 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/ICardFace.class differ diff --git a/forge-core/target/classes/main/java/forge/card/ICardRawAbilites.class b/forge-core/target/classes/main/java/forge/card/ICardRawAbilites.class new file mode 100644 index 00000000..da24d186 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/ICardRawAbilites.class differ diff --git a/forge-core/target/classes/main/java/forge/card/MagicColor$Color.class b/forge-core/target/classes/main/java/forge/card/MagicColor$Color.class new file mode 100644 index 00000000..b373d2b1 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/MagicColor$Color.class differ diff --git a/forge-core/target/classes/main/java/forge/card/MagicColor$Constant.class b/forge-core/target/classes/main/java/forge/card/MagicColor$Constant.class new file mode 100644 index 00000000..12900e75 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/MagicColor$Constant.class differ diff --git a/forge-core/target/classes/main/java/forge/card/MagicColor.class b/forge-core/target/classes/main/java/forge/card/MagicColor.class new file mode 100644 index 00000000..9f86044a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/MagicColor.class differ diff --git a/forge-core/target/classes/main/java/forge/card/PrintSheet$Reader.class b/forge-core/target/classes/main/java/forge/card/PrintSheet$Reader.class new file mode 100644 index 00000000..24ddfa07 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/PrintSheet$Reader.class differ diff --git a/forge-core/target/classes/main/java/forge/card/PrintSheet.class b/forge-core/target/classes/main/java/forge/card/PrintSheet.class new file mode 100644 index 00000000..e0351e3d Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/PrintSheet.class differ diff --git a/forge-core/target/classes/main/java/forge/card/mana/IParserManaCost.class b/forge-core/target/classes/main/java/forge/card/mana/IParserManaCost.class new file mode 100644 index 00000000..e1e45d79 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/mana/IParserManaCost.class differ diff --git a/forge-core/target/classes/main/java/forge/card/mana/ManaAtom.class b/forge-core/target/classes/main/java/forge/card/mana/ManaAtom.class new file mode 100644 index 00000000..95da166c Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/mana/ManaAtom.class differ diff --git a/forge-core/target/classes/main/java/forge/card/mana/ManaCost.class b/forge-core/target/classes/main/java/forge/card/mana/ManaCost.class new file mode 100644 index 00000000..850c9357 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/mana/ManaCost.class differ diff --git a/forge-core/target/classes/main/java/forge/card/mana/ManaCostParser.class b/forge-core/target/classes/main/java/forge/card/mana/ManaCostParser.class new file mode 100644 index 00000000..a1fe1181 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/mana/ManaCostParser.class differ diff --git a/forge-core/target/classes/main/java/forge/card/mana/ManaCostShard.class b/forge-core/target/classes/main/java/forge/card/mana/ManaCostShard.class new file mode 100644 index 00000000..3d3616eb Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/mana/ManaCostShard.class differ diff --git a/forge-core/target/classes/main/java/forge/card/mana/package-info.class b/forge-core/target/classes/main/java/forge/card/mana/package-info.class new file mode 100644 index 00000000..b150e30b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/card/mana/package-info.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/CardPool.class b/forge-core/target/classes/main/java/forge/deck/CardPool.class new file mode 100644 index 00000000..14f5b351 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/CardPool.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/Deck.class b/forge-core/target/classes/main/java/forge/deck/Deck.class new file mode 100644 index 00000000..3ffc4b27 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/Deck.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/DeckBase.class b/forge-core/target/classes/main/java/forge/deck/DeckBase.class new file mode 100644 index 00000000..3935da22 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/DeckBase.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/DeckFormat.class b/forge-core/target/classes/main/java/forge/deck/DeckFormat.class new file mode 100644 index 00000000..b2865076 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/DeckFormat.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/DeckGroup.class b/forge-core/target/classes/main/java/forge/deck/DeckGroup.class new file mode 100644 index 00000000..104e9947 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/DeckGroup.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/DeckRecognizer$Token.class b/forge-core/target/classes/main/java/forge/deck/DeckRecognizer$Token.class new file mode 100644 index 00000000..2862c343 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/DeckRecognizer$Token.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/DeckRecognizer$TokenType.class b/forge-core/target/classes/main/java/forge/deck/DeckRecognizer$TokenType.class new file mode 100644 index 00000000..7ad6bbcb Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/DeckRecognizer$TokenType.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/DeckRecognizer.class b/forge-core/target/classes/main/java/forge/deck/DeckRecognizer.class new file mode 100644 index 00000000..f193066f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/DeckRecognizer.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/DeckSection.class b/forge-core/target/classes/main/java/forge/deck/DeckSection.class new file mode 100644 index 00000000..133284b2 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/DeckSection.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGenPool.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenPool.class new file mode 100644 index 00000000..40391649 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenPool.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator2Color.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator2Color.class new file mode 100644 index 00000000..1c73b2c4 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator2Color.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator3Color.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator3Color.class new file mode 100644 index 00000000..99656f54 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator3Color.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator5Color.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator5Color.class new file mode 100644 index 00000000..2565f975 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGenerator5Color.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase$FilterCMC.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase$FilterCMC.class new file mode 100644 index 00000000..f0609d37 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase$FilterCMC.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase$MatchColorIdentity.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase$MatchColorIdentity.class new file mode 100644 index 00000000..507cb163 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase$MatchColorIdentity.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase.class new file mode 100644 index 00000000..f0d11caf Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorBase.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorMonoColor.class b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorMonoColor.class new file mode 100644 index 00000000..31aee240 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/DeckGeneratorMonoColor.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/IDeckGenPool.class b/forge-core/target/classes/main/java/forge/deck/generation/IDeckGenPool.class new file mode 100644 index 00000000..14b45fef Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/IDeckGenPool.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/generation/package-info.class b/forge-core/target/classes/main/java/forge/deck/generation/package-info.class new file mode 100644 index 00000000..61a7b7c5 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/generation/package-info.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/io/DeckFileHeader.class b/forge-core/target/classes/main/java/forge/deck/io/DeckFileHeader.class new file mode 100644 index 00000000..f2b20c5f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/io/DeckFileHeader.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/io/DeckGroupSerializer.class b/forge-core/target/classes/main/java/forge/deck/io/DeckGroupSerializer.class new file mode 100644 index 00000000..6b8862a7 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/io/DeckGroupSerializer.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/io/DeckSerializer.class b/forge-core/target/classes/main/java/forge/deck/io/DeckSerializer.class new file mode 100644 index 00000000..0ba572bd Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/io/DeckSerializer.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/io/DeckStorage.class b/forge-core/target/classes/main/java/forge/deck/io/DeckStorage.class new file mode 100644 index 00000000..8089f2ec Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/io/DeckStorage.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/io/package-info.class b/forge-core/target/classes/main/java/forge/deck/io/package-info.class new file mode 100644 index 00000000..b3e5ba95 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/io/package-info.class differ diff --git a/forge-core/target/classes/main/java/forge/deck/package-info.class b/forge-core/target/classes/main/java/forge/deck/package-info.class new file mode 100644 index 00000000..86a91708 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/deck/package-info.class differ diff --git a/forge-core/target/classes/main/java/forge/item/BoosterBox$Template$Reader.class b/forge-core/target/classes/main/java/forge/item/BoosterBox$Template$Reader.class new file mode 100644 index 00000000..5cc76464 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/BoosterBox$Template$Reader.class differ diff --git a/forge-core/target/classes/main/java/forge/item/BoosterBox$Template.class b/forge-core/target/classes/main/java/forge/item/BoosterBox$Template.class new file mode 100644 index 00000000..407a3628 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/BoosterBox$Template.class differ diff --git a/forge-core/target/classes/main/java/forge/item/BoosterBox.class b/forge-core/target/classes/main/java/forge/item/BoosterBox.class new file mode 100644 index 00000000..e081f387 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/BoosterBox.class differ diff --git a/forge-core/target/classes/main/java/forge/item/BoosterPack.class b/forge-core/target/classes/main/java/forge/item/BoosterPack.class new file mode 100644 index 00000000..92cbddbd Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/BoosterPack.class differ diff --git a/forge-core/target/classes/main/java/forge/item/BoxedProduct.class b/forge-core/target/classes/main/java/forge/item/BoxedProduct.class new file mode 100644 index 00000000..4107a2bd Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/BoxedProduct.class differ diff --git a/forge-core/target/classes/main/java/forge/item/FatPack$Template$Reader.class b/forge-core/target/classes/main/java/forge/item/FatPack$Template$Reader.class new file mode 100644 index 00000000..50e97d8c Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/FatPack$Template$Reader.class differ diff --git a/forge-core/target/classes/main/java/forge/item/FatPack$Template.class b/forge-core/target/classes/main/java/forge/item/FatPack$Template.class new file mode 100644 index 00000000..11373885 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/FatPack$Template.class differ diff --git a/forge-core/target/classes/main/java/forge/item/FatPack.class b/forge-core/target/classes/main/java/forge/item/FatPack.class new file mode 100644 index 00000000..4f423765 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/FatPack.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateColor.class b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateColor.class new file mode 100644 index 00000000..08927d29 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateColor.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateName.class b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateName.class new file mode 100644 index 00000000..0feffde8 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateName.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateNames.class b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateNames.class new file mode 100644 index 00000000..9d3c1a4d Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateNames.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateRarity.class b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateRarity.class new file mode 100644 index 00000000..8313da31 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateRarity.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateSets.class b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateSets.class new file mode 100644 index 00000000..cf5ddb33 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$PredicateSets.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$Presets.class b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$Presets.class new file mode 100644 index 00000000..f0e95f3e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates$Presets.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates.class b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates.class new file mode 100644 index 00000000..d0fb82ff Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard$Predicates.class differ diff --git a/forge-core/target/classes/main/java/forge/item/IPaperCard.class b/forge-core/target/classes/main/java/forge/item/IPaperCard.class new file mode 100644 index 00000000..efc6b4d7 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/IPaperCard.class differ diff --git a/forge-core/target/classes/main/java/forge/item/InventoryItem.class b/forge-core/target/classes/main/java/forge/item/InventoryItem.class new file mode 100644 index 00000000..ecf4bafb Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/InventoryItem.class differ diff --git a/forge-core/target/classes/main/java/forge/item/InventoryItemFromSet.class b/forge-core/target/classes/main/java/forge/item/InventoryItemFromSet.class new file mode 100644 index 00000000..34d8712e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/InventoryItemFromSet.class differ diff --git a/forge-core/target/classes/main/java/forge/item/ItemPredicate$Presets.class b/forge-core/target/classes/main/java/forge/item/ItemPredicate$Presets.class new file mode 100644 index 00000000..87658295 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/ItemPredicate$Presets.class differ diff --git a/forge-core/target/classes/main/java/forge/item/ItemPredicate.class b/forge-core/target/classes/main/java/forge/item/ItemPredicate.class new file mode 100644 index 00000000..0a49599a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/ItemPredicate.class differ diff --git a/forge-core/target/classes/main/java/forge/item/PaperCard.class b/forge-core/target/classes/main/java/forge/item/PaperCard.class new file mode 100644 index 00000000..19c59a13 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/PaperCard.class differ diff --git a/forge-core/target/classes/main/java/forge/item/PaperToken.class b/forge-core/target/classes/main/java/forge/item/PaperToken.class new file mode 100644 index 00000000..36e78cac Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/PaperToken.class differ diff --git a/forge-core/target/classes/main/java/forge/item/PreconDeck$Reader.class b/forge-core/target/classes/main/java/forge/item/PreconDeck$Reader.class new file mode 100644 index 00000000..270e962f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/PreconDeck$Reader.class differ diff --git a/forge-core/target/classes/main/java/forge/item/PreconDeck.class b/forge-core/target/classes/main/java/forge/item/PreconDeck.class new file mode 100644 index 00000000..426d429e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/PreconDeck.class differ diff --git a/forge-core/target/classes/main/java/forge/item/SealedProduct$Template$Reader.class b/forge-core/target/classes/main/java/forge/item/SealedProduct$Template$Reader.class new file mode 100644 index 00000000..7bee7a85 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/SealedProduct$Template$Reader.class differ diff --git a/forge-core/target/classes/main/java/forge/item/SealedProduct$Template.class b/forge-core/target/classes/main/java/forge/item/SealedProduct$Template.class new file mode 100644 index 00000000..bc5df27d Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/SealedProduct$Template.class differ diff --git a/forge-core/target/classes/main/java/forge/item/SealedProduct.class b/forge-core/target/classes/main/java/forge/item/SealedProduct.class new file mode 100644 index 00000000..3bdcd86b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/SealedProduct.class differ diff --git a/forge-core/target/classes/main/java/forge/item/TournamentPack.class b/forge-core/target/classes/main/java/forge/item/TournamentPack.class new file mode 100644 index 00000000..500c341f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/TournamentPack.class differ diff --git a/forge-core/target/classes/main/java/forge/item/generation/BoosterGenerator.class b/forge-core/target/classes/main/java/forge/item/generation/BoosterGenerator.class new file mode 100644 index 00000000..a81c7f4f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/generation/BoosterGenerator.class differ diff --git a/forge-core/target/classes/main/java/forge/item/generation/BoosterSlots.class b/forge-core/target/classes/main/java/forge/item/generation/BoosterSlots.class new file mode 100644 index 00000000..99358a2e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/generation/BoosterSlots.class differ diff --git a/forge-core/target/classes/main/java/forge/item/generation/IUnOpenedProduct.class b/forge-core/target/classes/main/java/forge/item/generation/IUnOpenedProduct.class new file mode 100644 index 00000000..66e93378 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/generation/IUnOpenedProduct.class differ diff --git a/forge-core/target/classes/main/java/forge/item/generation/UnOpenedProduct.class b/forge-core/target/classes/main/java/forge/item/generation/UnOpenedProduct.class new file mode 100644 index 00000000..a51f4037 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/generation/UnOpenedProduct.class differ diff --git a/forge-core/target/classes/main/java/forge/item/package-info.class b/forge-core/target/classes/main/java/forge/item/package-info.class new file mode 100644 index 00000000..72695016 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/item/package-info.class differ diff --git a/forge-core/target/classes/main/java/forge/util/Aggregates.class b/forge-core/target/classes/main/java/forge/util/Aggregates.class new file mode 100644 index 00000000..4ee3f15b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/Aggregates.class differ diff --git a/forge-core/target/classes/main/java/forge/util/Base64Coder.class b/forge-core/target/classes/main/java/forge/util/Base64Coder.class new file mode 100644 index 00000000..3c6d5524 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/Base64Coder.class differ diff --git a/forge-core/target/classes/main/java/forge/util/BinaryUtil.class b/forge-core/target/classes/main/java/forge/util/BinaryUtil.class new file mode 100644 index 00000000..2f2f0f79 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/BinaryUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/BuildInfo.class b/forge-core/target/classes/main/java/forge/util/BuildInfo.class new file mode 100644 index 00000000..8a29254e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/BuildInfo.class differ diff --git a/forge-core/target/classes/main/java/forge/util/CollectionSuppliers.class b/forge-core/target/classes/main/java/forge/util/CollectionSuppliers.class new file mode 100644 index 00000000..2a236d23 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/CollectionSuppliers.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ComparableOp.class b/forge-core/target/classes/main/java/forge/util/ComparableOp.class new file mode 100644 index 00000000..e39529a4 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ComparableOp.class differ diff --git a/forge-core/target/classes/main/java/forge/util/DebugTrace.class b/forge-core/target/classes/main/java/forge/util/DebugTrace.class new file mode 100644 index 00000000..e7adf7de Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/DebugTrace.class differ diff --git a/forge-core/target/classes/main/java/forge/util/EnumUtil.class b/forge-core/target/classes/main/java/forge/util/EnumUtil.class new file mode 100644 index 00000000..8364381d Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/EnumUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/FileSection.class b/forge-core/target/classes/main/java/forge/util/FileSection.class new file mode 100644 index 00000000..a1ba9995 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/FileSection.class differ diff --git a/forge-core/target/classes/main/java/forge/util/FileSectionManual.class b/forge-core/target/classes/main/java/forge/util/FileSectionManual.class new file mode 100644 index 00000000..e0dce080 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/FileSectionManual.class differ diff --git a/forge-core/target/classes/main/java/forge/util/FileUtil.class b/forge-core/target/classes/main/java/forge/util/FileUtil.class new file mode 100644 index 00000000..ff592b5c Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/FileUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/IHasName.class b/forge-core/target/classes/main/java/forge/util/IHasName.class new file mode 100644 index 00000000..990e6310 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/IHasName.class differ diff --git a/forge-core/target/classes/main/java/forge/util/IItemReader.class b/forge-core/target/classes/main/java/forge/util/IItemReader.class new file mode 100644 index 00000000..565b20f9 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/IItemReader.class differ diff --git a/forge-core/target/classes/main/java/forge/util/IItemSerializer.class b/forge-core/target/classes/main/java/forge/util/IItemSerializer.class new file mode 100644 index 00000000..ac66d5bc Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/IItemSerializer.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ITriggerEvent.class b/forge-core/target/classes/main/java/forge/util/ITriggerEvent.class new file mode 100644 index 00000000..937290c8 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ITriggerEvent.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ImageUtil.class b/forge-core/target/classes/main/java/forge/util/ImageUtil.class new file mode 100644 index 00000000..b3e3ba40 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ImageUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ItemPool.class b/forge-core/target/classes/main/java/forge/util/ItemPool.class new file mode 100644 index 00000000..7d938334 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ItemPool.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ItemPoolSorter.class b/forge-core/target/classes/main/java/forge/util/ItemPoolSorter.class new file mode 100644 index 00000000..6973143e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ItemPoolSorter.class differ diff --git a/forge-core/target/classes/main/java/forge/util/Lang.class b/forge-core/target/classes/main/java/forge/util/Lang.class new file mode 100644 index 00000000..2de8c684 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/Lang.class differ diff --git a/forge-core/target/classes/main/java/forge/util/LocalizationChangeObserver.class b/forge-core/target/classes/main/java/forge/util/LocalizationChangeObserver.class new file mode 100644 index 00000000..af945972 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/LocalizationChangeObserver.class differ diff --git a/forge-core/target/classes/main/java/forge/util/Localizer$Language.class b/forge-core/target/classes/main/java/forge/util/Localizer$Language.class new file mode 100644 index 00000000..8639a61e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/Localizer$Language.class differ diff --git a/forge-core/target/classes/main/java/forge/util/Localizer.class b/forge-core/target/classes/main/java/forge/util/Localizer.class new file mode 100644 index 00000000..56e47ac7 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/Localizer.class differ diff --git a/forge-core/target/classes/main/java/forge/util/MyRandom.class b/forge-core/target/classes/main/java/forge/util/MyRandom.class new file mode 100644 index 00000000..f5c2c423 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/MyRandom.class differ diff --git a/forge-core/target/classes/main/java/forge/util/NameGenerator.class b/forge-core/target/classes/main/java/forge/util/NameGenerator.class new file mode 100644 index 00000000..bc52c95e Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/NameGenerator.class differ diff --git a/forge-core/target/classes/main/java/forge/util/PredicateString$StringOp.class b/forge-core/target/classes/main/java/forge/util/PredicateString$StringOp.class new file mode 100644 index 00000000..289e3c5b Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/PredicateString$StringOp.class differ diff --git a/forge-core/target/classes/main/java/forge/util/PredicateString.class b/forge-core/target/classes/main/java/forge/util/PredicateString.class new file mode 100644 index 00000000..60679fde Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/PredicateString.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ReflectionUtil.class b/forge-core/target/classes/main/java/forge/util/ReflectionUtil.class new file mode 100644 index 00000000..afb7be3a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ReflectionUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/RuntimeVersion.class b/forge-core/target/classes/main/java/forge/util/RuntimeVersion.class new file mode 100644 index 00000000..8fb93760 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/RuntimeVersion.class differ diff --git a/forge-core/target/classes/main/java/forge/util/Settable.class b/forge-core/target/classes/main/java/forge/util/Settable.class new file mode 100644 index 00000000..8b19e20a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/Settable.class differ diff --git a/forge-core/target/classes/main/java/forge/util/TextUtil$PhraseCase.class b/forge-core/target/classes/main/java/forge/util/TextUtil$PhraseCase.class new file mode 100644 index 00000000..cbbce7c2 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/TextUtil$PhraseCase.class differ diff --git a/forge-core/target/classes/main/java/forge/util/TextUtil.class b/forge-core/target/classes/main/java/forge/util/TextUtil.class new file mode 100644 index 00000000..728fa799 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/TextUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ThreadUtil$WorkerThreadFactory.class b/forge-core/target/classes/main/java/forge/util/ThreadUtil$WorkerThreadFactory.class new file mode 100644 index 00000000..9705e4a4 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ThreadUtil$WorkerThreadFactory.class differ diff --git a/forge-core/target/classes/main/java/forge/util/ThreadUtil.class b/forge-core/target/classes/main/java/forge/util/ThreadUtil.class new file mode 100644 index 00000000..8f53cfb5 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/ThreadUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/Visitor.class b/forge-core/target/classes/main/java/forge/util/Visitor.class new file mode 100644 index 00000000..cb3bf82a Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/Visitor.class differ diff --git a/forge-core/target/classes/main/java/forge/util/collect/FCollection$EmptyFCollection.class b/forge-core/target/classes/main/java/forge/util/collect/FCollection$EmptyFCollection.class new file mode 100644 index 00000000..edffe549 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/collect/FCollection$EmptyFCollection.class differ diff --git a/forge-core/target/classes/main/java/forge/util/collect/FCollection.class b/forge-core/target/classes/main/java/forge/util/collect/FCollection.class new file mode 100644 index 00000000..62583452 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/collect/FCollection.class differ diff --git a/forge-core/target/classes/main/java/forge/util/collect/FCollectionReader.class b/forge-core/target/classes/main/java/forge/util/collect/FCollectionReader.class new file mode 100644 index 00000000..7426e1b5 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/collect/FCollectionReader.class differ diff --git a/forge-core/target/classes/main/java/forge/util/collect/FCollectionView.class b/forge-core/target/classes/main/java/forge/util/collect/FCollectionView.class new file mode 100644 index 00000000..10b41c79 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/collect/FCollectionView.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/EnumMapOfLists.class b/forge-core/target/classes/main/java/forge/util/maps/EnumMapOfLists.class new file mode 100644 index 00000000..b93c3d72 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/EnumMapOfLists.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/EnumMapToAmount.class b/forge-core/target/classes/main/java/forge/util/maps/EnumMapToAmount.class new file mode 100644 index 00000000..ab22e81f Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/EnumMapToAmount.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/HashMapOfLists.class b/forge-core/target/classes/main/java/forge/util/maps/HashMapOfLists.class new file mode 100644 index 00000000..1e6dd295 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/HashMapOfLists.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/LinkedHashMapToAmount.class b/forge-core/target/classes/main/java/forge/util/maps/LinkedHashMapToAmount.class new file mode 100644 index 00000000..22d37759 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/LinkedHashMapToAmount.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/MapOfLists.class b/forge-core/target/classes/main/java/forge/util/maps/MapOfLists.class new file mode 100644 index 00000000..38760b52 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/MapOfLists.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/MapToAmount.class b/forge-core/target/classes/main/java/forge/util/maps/MapToAmount.class new file mode 100644 index 00000000..9d815535 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/MapToAmount.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/MapToAmountUtil.class b/forge-core/target/classes/main/java/forge/util/maps/MapToAmountUtil.class new file mode 100644 index 00000000..a152b66d Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/MapToAmountUtil.class differ diff --git a/forge-core/target/classes/main/java/forge/util/maps/package-info.class b/forge-core/target/classes/main/java/forge/util/maps/package-info.class new file mode 100644 index 00000000..4601a072 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/maps/package-info.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/IStorage.class b/forge-core/target/classes/main/java/forge/util/storage/IStorage.class new file mode 100644 index 00000000..af8eba95 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/IStorage.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/StorageBase.class b/forge-core/target/classes/main/java/forge/util/storage/StorageBase.class new file mode 100644 index 00000000..378e55b7 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/StorageBase.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/StorageImmediatelySerialized.class b/forge-core/target/classes/main/java/forge/util/storage/StorageImmediatelySerialized.class new file mode 100644 index 00000000..bab6e333 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/StorageImmediatelySerialized.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/StorageNestedFolders.class b/forge-core/target/classes/main/java/forge/util/storage/StorageNestedFolders.class new file mode 100644 index 00000000..c4791e3c Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/StorageNestedFolders.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/StorageReaderBase.class b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderBase.class new file mode 100644 index 00000000..ef48dc1d Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderBase.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFile.class b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFile.class new file mode 100644 index 00000000..869ad3d8 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFile.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFileSections.class b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFileSections.class new file mode 100644 index 00000000..9fe8d612 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFileSections.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFolder.class b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFolder.class new file mode 100644 index 00000000..9964a7d6 Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/StorageReaderFolder.class differ diff --git a/forge-core/target/classes/main/java/forge/util/storage/package-info.class b/forge-core/target/classes/main/java/forge/util/storage/package-info.class new file mode 100644 index 00000000..74dde1ac Binary files /dev/null and b/forge-core/target/classes/main/java/forge/util/storage/package-info.class differ diff --git a/forge-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/forge-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 00000000..f0e6312d --- /dev/null +++ b/forge-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,253 @@ +forge/card/CardRulesPredicates$PredicateSplitType.class +forge/card/CardEdition$Collection$1.class +forge/util/maps/EnumMapToAmount.class +forge/card/MagicColor.class +forge/item/BoosterBox$Template$Reader.class +forge/util/storage/StorageReaderFolder$1.class +forge/util/ItemPool$3.class +forge/item/ItemPredicate$2.class +forge/util/PredicateString.class +forge/card/CardEdition$Reader$1.class +forge/card/ICardCharacteristics.class +forge/card/CardEdition$CardInSet.class +forge/deck/DeckRecognizer$Token.class +forge/deck/generation/DeckGenerator2Color.class +forge/card/CardFacePredicates$PredicateSuperType.class +forge/deck/generation/DeckGeneratorBase$3.class +forge/card/CardRulesPredicates$4.class +forge/item/FatPack.class +forge/util/ImageUtil.class +forge/util/Visitor.class +forge/deck/Deck.class +forge/deck/DeckRecognizer$TokenType.class +forge/card/ICardFace.class +forge/card/CardEdition$FoilType.class +forge/card/CardEdition$Predicates$1.class +forge/card/CardRules$1.class +forge/card/CardRulesPredicates$Presets$3.class +forge/util/maps/MapToAmountUtil$1.class +forge/card/CardType$1.class +forge/deck/DeckFormat$6.class +forge/util/Lang.class +forge/item/BoosterBox.class +forge/util/storage/StorageImmediatelySerialized$1.class +forge/deck/io/DeckGroupSerializer.class +forge/StaticData.class +forge/util/maps/HashMapOfLists.class +forge/item/IPaperCard$Predicates.class +forge/card/CardRulesPredicates$LeafColor$ColorOperator.class +forge/util/BinaryUtil.class +forge/CardStorageReader.class +forge/util/IItemReader.class +forge/util/PredicateString$4.class +forge/util/ItemPoolSorter.class +forge/item/IPaperCard.class +forge/item/IPaperCard$Predicates$PredicateRarity.class +forge/card/CardDb.class +forge/card/CardRules$Reader$ManaCostParser.class +forge/util/maps/MapOfLists.class +forge/card/CardStateName.class +forge/deck/io/DeckFileHeader.class +forge/deck/generation/DeckGeneratorBase.class +forge/card/CardEdition$Predicates$CanMakeFatPack.class +forge/deck/Deck$1.class +forge/card/CardType$Constant.class +forge/card/PrintSheet$Reader.class +forge/card/CardEdition$Predicates$CanMakeBoosterBox.class +forge/card/CardFacePredicates$Presets$2.class +forge/item/PaperToken.class +forge/item/SealedProduct.class +forge/util/Aggregates.class +forge/deck/CardPool.class +forge/item/generation/BoosterSlots.class +forge/item/ItemPredicate$Presets.class +forge/item/SealedProduct$Template$1.class +forge/util/collect/FCollection.class +forge/card/CardFacePredicates$Presets.class +forge/deck/DeckFormat$1.class +forge/card/CardRulesPredicates$PredicateSuperType.class +forge/deck/DeckGroup$1.class +forge/card/ColorSet$1.class +forge/item/SealedProduct$Template.class +forge/util/PredicateString$StringOp.class +forge/card/CardFace$FaceSelectionMethod.class +forge/util/storage/StorageReaderBase.class +forge/deck/DeckSection.class +forge/item/IPaperCard$Predicates$PredicateName.class +forge/card/CardRulesPredicates$PredicateCoreType.class +forge/card/MagicColor$Constant.class +forge/deck/DeckFormat$7.class +forge/CardStorageReader$2.class +forge/card/CardRules.class +forge/card/CardRulesPredicates.class +forge/item/FatPack$1.class +forge/card/mana/IParserManaCost.class +forge/deck/DeckBase.class +forge/util/EnumUtil.class +forge/item/IPaperCard$Predicates$Presets.class +forge/card/DeckHints.class +forge/item/TournamentPack$1.class +forge/util/CollectionSuppliers$3.class +forge/card/CardRulesPredicates$6.class +forge/util/ComparableOp.class +forge/CardStorageReader$ProgressObserver.class +forge/card/CardType$CoreType.class +forge/card/CardFacePredicates$PredicateCoreType.class +forge/util/maps/MapToAmount.class +forge/item/ItemPredicate.class +forge/card/CardDb$CardRequest.class +forge/card/CardRulesPredicates$3.class +forge/util/PredicateString$1.class +forge/util/FileSectionManual.class +forge/card/CardTypeView.class +forge/card/CardDb$SetPreference.class +forge/util/CollectionSuppliers$2.class +forge/card/CardRulesPredicates$5.class +forge/deck/DeckFormat$5.class +forge/card/CardSplitType.class +forge/item/generation/IUnOpenedProduct.class +forge/card/CardRarity.class +forge/CardStorageReader$ProgressObserver$1.class +forge/util/ItemPoolSorter$1.class +forge/deck/DeckRecognizer.class +forge/item/SealedProduct$Template$Reader.class +forge/util/Localizer$Language.class +forge/card/ICardRawAbilites.class +forge/item/InventoryItemFromSet.class +forge/item/IPaperCard$Predicates$PredicateNames.class +forge/CardStorageReader$3.class +forge/deck/io/DeckStorage$1.class +forge/card/CardEdition$Reader.class +forge/item/ItemPredicate$1.class +forge/card/CardFacePredicates$1.class +forge/util/CollectionSuppliers$1.class +forge/util/storage/IStorage.class +forge/FTrace.class +forge/item/TournamentPack.class +forge/item/PaperCard.class +forge/deck/DeckFormat$4.class +forge/util/FileSection.class +forge/card/CardEdition$1.class +forge/card/CardEdition$Predicates$CanMakeBooster.class +forge/util/Base64Coder.class +forge/card/CardDb$Editor.class +forge/card/mana/ManaAtom.class +forge/deck/generation/DeckGenerator5Color.class +forge/card/PrintSheet$1.class +forge/util/TextUtil.class +forge/card/CardRulesPredicates$7.class +forge/item/BoosterPack$1.class +forge/deck/generation/DeckGeneratorBase$MatchColorIdentity.class +forge/item/IPaperCard$1.class +forge/util/PredicateString$2.class +forge/card/CardFace.class +forge/util/collect/FCollectionReader.class +forge/card/mana/ManaCostShard.class +forge/card/CardRulesPredicates$LeafNumber.class +forge/card/ICardDatabase.class +forge/deck/DeckFormat$3.class +forge/item/BoosterBox$1.class +forge/card/CardEdition$Predicates$CanMakeStarter.class +forge/util/FileUtil$1.class +forge/util/maps/LinkedHashMapToAmount.class +forge/card/CardRulesPredicates$Presets.class +forge/item/PaperCard$2.class +forge/item/PreconDeck$1.class +forge/deck/io/DeckSerializer.class +forge/item/generation/BoosterGenerator.class +forge/card/CardRulesPredicates$LeafString$CardField.class +forge/CardStorageReader$1.class +forge/util/storage/StorageReaderFileSections.class +forge/util/Localizer.class +forge/util/ThreadUtil$WorkerThreadFactory.class +forge/card/ColorSet.class +forge/deck/io/DeckStorage.class +forge/item/BoxedProduct.class +forge/item/PaperCard$1.class +forge/item/BoosterBox$Template.class +forge/item/FatPack$Template.class +forge/deck/generation/DeckGeneratorBase$FilterCMC.class +forge/card/CardDb$PredicateExistsInSets.class +forge/card/CardType.class +forge/card/DeckHints$1.class +forge/deck/DeckFormat$2.class +forge/util/maps/MapToAmountUtil.class +forge/item/PreconDeck$2.class +forge/item/generation/BoosterGenerator$1.class +forge/item/IPaperCard$Predicates$PredicateColor.class +forge/card/CardRulesPredicates$2.class +forge/util/ItemPool.class +forge/util/NameGenerator.class +forge/item/PreconDeck.class +forge/deck/generation/IDeckGenPool.class +forge/card/CardRulesPredicates$Presets$1.class +forge/util/PredicateString$3.class +forge/item/BoosterPack$2.class +forge/util/IHasName.class +forge/util/TextUtil$1.class +forge/card/CardFacePredicates$Presets$1.class +forge/card/CardRulesPredicates$1.class +forge/util/ITriggerEvent.class +forge/util/maps/EnumMapOfLists.class +forge/util/storage/StorageReaderFolder.class +forge/LobbyPlayer.class +forge/card/CardDb$1.class +forge/card/CardEdition.class +forge/card/PrintSheet.class +forge/card/MagicColor$Color.class +forge/card/ColorSet$ColorIterator.class +forge/deck/io/DeckGroupSerializer$1.class +forge/util/storage/StorageNestedFolders.class +forge/card/CardEdition$Collection.class +forge/util/storage/StorageImmediatelySerialized.class +forge/item/PreconDeck$Reader.class +forge/card/CardRulesPredicates$Presets$2.class +forge/item/generation/UnOpenedProduct.class +forge/deck/generation/DeckGeneratorMonoColor.class +forge/card/CardFacePredicates.class +forge/card/mana/ManaCostParser.class +forge/card/DeckHints$Type.class +forge/util/IItemSerializer.class +forge/deck/DeckFormat.class +forge/card/CardRarity$1.class +forge/card/CardEdition$Type.class +forge/card/CardEdition$Predicates.class +forge/util/FileUtil.class +forge/card/CardEdition$Collection$2.class +forge/ImageKeys.class +forge/deck/generation/DeckGeneratorBase$1.class +forge/util/collect/FCollectionView.class +forge/card/mana/ManaCost.class +forge/item/InventoryItem.class +forge/util/BuildInfo.class +forge/deck/DeckGroup$2.class +forge/util/LocalizationChangeObserver.class +forge/item/BoosterPack.class +forge/util/ItemPool$1.class +forge/card/CardAiHints.class +forge/item/FatPack$Template$Reader.class +forge/deck/generation/DeckGeneratorBase$2.class +forge/card/CardChangedType.class +forge/card/CardType$Supertype.class +forge/deck/generation/DeckGenPool.class +forge/util/DebugTrace.class +forge/util/ItemPool$2.class +forge/card/CardRulesPredicates$LeafString.class +forge/util/Settable.class +forge/card/CardEdition$Collection$3.class +forge/util/collect/FCollection$EmptyFCollection.class +forge/util/storage/StorageBase.class +forge/card/CardRulesPredicates$LeafColor.class +forge/card/CardRulesPredicates$LeafNumber$CardField.class +forge/util/MyRandom.class +forge/util/ThreadUtil.class +forge/card/CardRules$Reader.class +forge/card/MagicColor$1.class +forge/util/CollectionSuppliers.class +forge/util/TextUtil$PhraseCase.class +forge/util/ReflectionUtil.class +forge/deck/generation/DeckGenerator3Color.class +forge/util/RuntimeVersion.class +forge/deck/DeckGroup.class +forge/util/storage/StorageReaderFile.class +forge/item/IPaperCard$Predicates$PredicateSets.class diff --git a/forge-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/forge-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 00000000..ebb886f6 --- /dev/null +++ b/forge-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,121 @@ +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/DeckGenerator3Color.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/EnumMapToAmount.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardRulesPredicates.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/BinaryUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/SealedProduct.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/DeckHints.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/LocalizationChangeObserver.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/IHasName.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/MapToAmountUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/LobbyPlayer.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/DebugTrace.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/TextUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/MagicColor.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/ICardRawAbilites.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/DeckGenerator2Color.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/ItemPoolSorter.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/ICardDatabase.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/mana/ManaCostShard.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/BoosterBox.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/FileSection.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/ThreadUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/generation/UnOpenedProduct.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/EnumUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/StorageReaderBase.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/io/DeckSerializer.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/ColorSet.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/TournamentPack.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/mana/ManaCostParser.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/BoosterPack.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/FileSectionManual.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/FileUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/DeckFormat.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardFace.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/Aggregates.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/package-info.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardRules.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/DeckGenPool.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/FTrace.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/generation/BoosterGenerator.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardEdition.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/DeckGeneratorMonoColor.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/io/DeckFileHeader.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/PaperCard.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/Settable.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/DeckGenerator5Color.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/FatPack.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/PaperToken.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardTypeView.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/mana/IParserManaCost.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/RuntimeVersion.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/mana/ManaCost.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/StorageNestedFolders.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/Deck.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/collect/FCollection.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/StorageReaderFolder.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/DeckRecognizer.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/ItemPool.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/package-info.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/IItemSerializer.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/Lang.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/CardPool.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/Base64Coder.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/collect/FCollectionView.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/MapToAmount.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/IItemReader.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/ICardFace.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/Visitor.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/IStorage.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/PrintSheet.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/ImageKeys.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardFacePredicates.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/mana/package-info.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/InventoryItem.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/StorageReaderFile.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardAiHints.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardDb.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardSplitType.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardType.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/package-info.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/DeckSection.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/NameGenerator.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardStateName.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/DeckGroup.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/InventoryItemFromSet.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/CollectionSuppliers.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/HashMapOfLists.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/ICardCharacteristics.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/StaticData.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/package-info.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/CardStorageReader.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/ComparableOp.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/generation/BoosterSlots.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/mana/ManaAtom.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/ReflectionUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/MyRandom.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/StorageImmediatelySerialized.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/DeckGeneratorBase.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardRarity.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/StorageReaderFileSections.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/ITriggerEvent.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/BuildInfo.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/card/CardChangedType.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/PreconDeck.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/DeckBase.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/IPaperCard.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/generation/IUnOpenedProduct.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/PredicateString.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/io/DeckStorage.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/ImageUtil.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/ItemPredicate.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/Localizer.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/generation/IDeckGenPool.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/item/BoxedProduct.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/package-info.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/collect/FCollectionReader.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/MapOfLists.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/io/package-info.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/LinkedHashMapToAmount.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/deck/io/DeckGroupSerializer.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/maps/EnumMapOfLists.java +/Users/Relintai/Projects/mtg-forge-ios/forge-core/src/main/java/forge/util/storage/StorageBase.java diff --git a/forge-game/target/.gitignore b/forge-game/target/.gitignore new file mode 100644 index 00000000..45698379 --- /dev/null +++ b/forge-game/target/.gitignore @@ -0,0 +1,2 @@ +/classes/ +/test-classes/ diff --git a/forge-gui-android/target/classes/forge/app/Exiter.class b/forge-gui-android/target/classes/forge/app/Exiter.class new file mode 100644 index 00000000..42bc5beb Binary files /dev/null and b/forge-gui-android/target/classes/forge/app/Exiter.class differ diff --git a/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$1.class b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$1.class new file mode 100644 index 00000000..dfeaa1ea Binary files /dev/null and b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$1.class differ diff --git a/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$2.class b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$2.class new file mode 100644 index 00000000..8e29c21f Binary files /dev/null and b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$2.class differ diff --git a/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$3.class b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$3.class new file mode 100644 index 00000000..288b556d Binary files /dev/null and b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter$3.class differ diff --git a/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter.class b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter.class new file mode 100644 index 00000000..6148fd21 Binary files /dev/null and b/forge-gui-android/target/classes/forge/app/Main$AndroidAdapter.class differ diff --git a/forge-gui-android/target/classes/forge/app/Main$AndroidClipboard.class b/forge-gui-android/target/classes/forge/app/Main$AndroidClipboard.class new file mode 100644 index 00000000..400d4002 Binary files /dev/null and b/forge-gui-android/target/classes/forge/app/Main$AndroidClipboard.class differ diff --git a/forge-gui-android/target/classes/forge/app/Main.class b/forge-gui-android/target/classes/forge/app/Main.class new file mode 100644 index 00000000..c7d45b2a Binary files /dev/null and b/forge-gui-android/target/classes/forge/app/Main.class differ diff --git a/forge-gui-android/target/classes/version.txt b/forge-gui-android/target/classes/version.txt new file mode 100644 index 00000000..c513e857 --- /dev/null +++ b/forge-gui-android/target/classes/version.txt @@ -0,0 +1 @@ +1.6.4.001 \ No newline at end of file diff --git a/forge-gui-desktop/.classpath b/forge-gui-desktop/.classpath index 2b0355ca..ed5a0042 100644 --- a/forge-gui-desktop/.classpath +++ b/forge-gui-desktop/.classpath @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/forge-gui-desktop/.project b/forge-gui-desktop/.project index 6fa12dfc..f30af0eb 100644 --- a/forge-gui-desktop/.project +++ b/forge-gui-desktop/.project @@ -10,6 +10,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.m2e.core.maven2Builder @@ -19,5 +24,6 @@ org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature + org.eclipse.buildship.core.gradleprojectnature diff --git a/forge-gui-desktop/.settings/org.eclipse.buildship.core.prefs b/forge-gui-desktop/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..1b6cac23 --- /dev/null +++ b/forge-gui-desktop/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:29:55 CEST 2017 +connection.project.dir=.. diff --git a/forge-gui-desktop/.settings/org.eclipse.jdt.core.prefs b/forge-gui-desktop/.settings/org.eclipse.jdt.core.prefs index 62492222..672496e1 100644 --- a/forge-gui-desktop/.settings/org.eclipse.jdt.core.prefs +++ b/forge-gui-desktop/.settings/org.eclipse.jdt.core.prefs @@ -1,12 +1,12 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/forge-gui-desktop/build.gradle b/forge-gui-desktop/build.gradle new file mode 100644 index 00000000..5d1d2129 --- /dev/null +++ b/forge-gui-desktop/build.gradle @@ -0,0 +1,55 @@ +apply plugin: "java" + +sourceCompatibility = 1.6 +sourceSets.main.java.srcDirs = [ "src/main/java/forge/" ] + +project.ext.mainClassName = "forge.GuiDesktop" +project.ext.assetsDir = new File("../core/assets"); + +task run(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true +} + +task debug(dependsOn: classes, type: JavaExec) { + main = project.mainClassName + classpath = sourceSets.main.runtimeClasspath + standardInput = System.in + workingDir = project.assetsDir + ignoreExitValue = true + debug = true +} + +task dist(type: Jar) { + from files(sourceSets.main.output.classesDir) + from files(sourceSets.main.output.resourcesDir) + from {configurations.compile.collect {zipTree(it)}} + from files(project.assetsDir); + + manifest { + attributes 'Main-Class': project.mainClassName + } +} + +dist.dependsOn classes + +eclipse { + project { + name = appName + "-gui-desktop" + linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/core/assets' + } +} + +task afterEclipseImport(description: "Post processing after project generation", group: "IDE") { + doLast { + def classpath = new XmlParser().parse(file(".classpath")) + new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]); + def writer = new FileWriter(file(".classpath")) + def printer = new XmlNodePrinter(new PrintWriter(writer)) + printer.setPreserveWhitespace(true) + printer.print(classpath) + } +} diff --git a/forge-gui-desktop/src/test/java/forge/BoosterDraft1Test.java b/forge-gui-desktop/src/test/java/forge/BoosterDraft1Test.java deleted file mode 100644 index ed719a32..00000000 --- a/forge-gui-desktop/src/test/java/forge/BoosterDraft1Test.java +++ /dev/null @@ -1,32 +0,0 @@ -package forge; - -import forge.deck.CardPool; -import forge.limited.BoosterDraft; -import forge.limited.LimitedPoolType; - -import org.testng.annotations.Test; - -/** - * Unit test for simple App. - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class BoosterDraft1Test { - - /** - * Booster draft_1 test1. - * - * @throws Exception - * the exception - */ - @Test(groups = { "UnitTest", "fast" }, timeOut = 1000, enabled = false) - public void boosterDraft1Test1() throws Exception { - final BoosterDraft draft = BoosterDraft.createDraft(LimitedPoolType.Full); - if (draft == null) { return; } - - while (draft.hasNextChoice()) { - final CardPool list = draft.nextChoice(); - System.out.println(list.countAll()); - draft.setChoice(list.toFlatList().get(0)); - } - } -} diff --git a/forge-gui-desktop/src/test/java/forge/BoosterDraftTest.java b/forge-gui-desktop/src/test/java/forge/BoosterDraftTest.java deleted file mode 100644 index 33a7140b..00000000 --- a/forge-gui-desktop/src/test/java/forge/BoosterDraftTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package forge; - -import forge.deck.CardPool; -import forge.deck.Deck; -import forge.game.card.Card; -import forge.item.PaperCard; -import forge.item.SealedProduct; -import forge.item.generation.BoosterGenerator; -import forge.limited.IBoosterDraft; -import forge.model.FModel; - -import org.testng.annotations.Test; - -import java.util.List; - -/** - *

- * BoosterDraftTest class. - *

- * - * @author Forge - * @version $Id: BoosterDraftTest.java 24769 2014-02-09 13:56:04Z Hellfish $ - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class BoosterDraftTest implements IBoosterDraft { - - private int n = 3; - - @Override - @Test(timeOut = 1000) - public Deck[] getDecks() { - return null; - } - - @Override - public CardPool nextChoice() { - this.n--; - SealedProduct.Template booster = FModel.getMagicDb().getBoosters().get("M11"); - CardPool result = new CardPool(); - result.addAllFlat(BoosterGenerator.getBoosterPack(booster)); - return result; - } - - /** {@inheritDoc} */ - @Override - public void setChoice(final PaperCard c) { - System.out.println(c.getName()); - } - - @Override - public boolean hasNextChoice() { - return this.n > 0; - } - - @Override - public boolean isRoundOver() { - return hasNextChoice(); - } - - public List getChosenCards() { - return null; - } - - public List getUnchosenCards() { - return null; - } - - @Override - public boolean isPileDraft() { - return false; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/CardRankerTest.java b/forge-gui-desktop/src/test/java/forge/CardRankerTest.java deleted file mode 100644 index 244b37c6..00000000 --- a/forge-gui-desktop/src/test/java/forge/CardRankerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package forge; - -import forge.card.CardRarity; -import forge.card.CardRules; -import forge.item.PaperCard; -import forge.limited.CardRanker; -import forge.properties.ForgeConstants; -import forge.util.FileUtil; -import org.junit.Assert; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -@Test(timeOut = 1000, enabled = true) -public class CardRankerTest { - - @BeforeTest - void setupTest() { - GuiBase.setInterface(new GuiDesktop()); - } - - @Test(timeOut = 1000, enabled = true) - void testRank() { - List list = new ArrayList(); - PaperCard c0 = readCard("makindi_patrol.txt"); - list.add(c0); - PaperCard c1 = readCard("hero_of_goma_fada.txt"); - list.add(c1); - PaperCard c2 = readCard("altars_reap.txt"); - list.add(c2); - PaperCard c3 = readCard("plains.txt"); - list.add(c3); - - List ranked = CardRanker.rankCardsInDeck(list); - Assert.assertEquals("Hero of Goma Fada", ranked.get(0).getName()); - Assert.assertEquals("Makindi Patrol", ranked.get(1).getName()); - Assert.assertEquals("Altar's Reap", ranked.get(2).getName()); - Assert.assertEquals("Plains", ranked.get(3).getName()); - } - - /** - * Create a CardPrinted from the given filename. - * - * @param filename - * the filename - * @return the CardPrinted - */ - protected PaperCard readCard(String filename) { - String firstLetter = filename.substring(0, 1); - File dir = new File(ForgeConstants.CARD_DATA_DIR, firstLetter); - File txtFile = new File(dir, filename); - - CardRules.Reader crr = new CardRules.Reader(); - for (String line : FileUtil.readFile(txtFile)) { - crr.parseLine(line); - } - // Don't care what the actual rarity is here. - return new PaperCard(crr.getCard(), "BFZ", CardRarity.Common, 0); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/GuiDownloadPicturesLQTest.java b/forge-gui-desktop/src/test/java/forge/GuiDownloadPicturesLQTest.java deleted file mode 100644 index d00c3433..00000000 --- a/forge-gui-desktop/src/test/java/forge/GuiDownloadPicturesLQTest.java +++ /dev/null @@ -1,21 +0,0 @@ -package forge; - -import org.testng.annotations.Test; - -import forge.download.GuiDownloadPicturesLQ; -import forge.download.GuiDownloader; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class GuiDownloadPicturesLQTest { - - /** - * Gui download pictures test1. - */ - @Test(enabled = false, timeOut = 1000) - public void guiDownloadPicturesTest1() { - new GuiDownloader(new GuiDownloadPicturesLQ()).show(); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/GuiDownloadSetPicturesLQTest.java b/forge-gui-desktop/src/test/java/forge/GuiDownloadSetPicturesLQTest.java deleted file mode 100644 index 5aefba0c..00000000 --- a/forge-gui-desktop/src/test/java/forge/GuiDownloadSetPicturesLQTest.java +++ /dev/null @@ -1,21 +0,0 @@ -package forge; - -import org.testng.annotations.Test; - -import forge.download.GuiDownloadSetPicturesLQ; -import forge.download.GuiDownloader; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class GuiDownloadSetPicturesLQTest { - - /** - * Gui download set pictures lq test1. - */ - @Test(enabled = false, timeOut = 1000) - public void g() { - new GuiDownloader(new GuiDownloadSetPicturesLQ()).show(); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/GuiProgressBarWindowTest.java b/forge-gui-desktop/src/test/java/forge/GuiProgressBarWindowTest.java deleted file mode 100644 index f6fd70d7..00000000 --- a/forge-gui-desktop/src/test/java/forge/GuiProgressBarWindowTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package forge; - -import org.testng.annotations.Test; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }) -public class GuiProgressBarWindowTest { - - /** - * Gui progress bar window test1. - */ - @Test(groups = { "UnitTest", "fast" }) - public void guiProgressBarWindowTest1() { - /*try { - FSkin.Colors.updateAll(); - final GuiProgressBarWindow dialog = new GuiProgressBarWindow(); - dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - Assert.assertNotNull(dialog); - dialog.dispose(); - } catch (final Exception e) { - e.printStackTrace(); - }*/ - } -} diff --git a/forge-gui-desktop/src/test/java/forge/PanelTest.java b/forge-gui-desktop/src/test/java/forge/PanelTest.java deleted file mode 100644 index 457b7a61..00000000 --- a/forge-gui-desktop/src/test/java/forge/PanelTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package forge; - -import forge.error.BugReporter; - -import org.testng.annotations.Test; - -import javax.swing.*; - -import java.awt.*; - -/** - *

- * PanelTest class. - *

- * - * @author Forge - * @version $Id: PanelTest.java 24769 2014-02-09 13:56:04Z Hellfish $ - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class PanelTest extends JFrame { - /** - * - */ - private static final long serialVersionUID = 1L; - private final JPanel jPanel1 = new JPanel(); - private final JLabel jLabel1 = new JLabel(); - - /** - * Phase test1. - */ - @Test(timeOut = 1000, enabled = false) - public void phaseTest1() { - final PanelTest p = new PanelTest(); - p.setSize(300, 300); - p.setVisible(true); - } - - /** - *

- * Constructor for PanelTest. - *

- */ - public PanelTest() { - try { - this.jbInit(); - } - catch (final Exception ex) { - BugReporter.reportException(ex); - ex.printStackTrace(); - } - } - - /** - *

- * jbInit. - *

- * - * @throws java.lang.Exception - * if any. - */ - private void jbInit() throws Exception { - this.getContentPane().setLayout(null); - this.jPanel1.setForeground(Color.orange); - this.jPanel1.setBounds(new Rectangle(15, 36, 252, 156)); - this.jLabel1.setFont(new java.awt.Font("Dialog", 1, 12)); - this.jLabel1.setForeground(new Color(70, 90, 163)); - this.jLabel1.setText("jLabel1"); - this.getContentPane().add(this.jPanel1, null); - this.jPanel1.add(this.jLabel1, null); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/RunTest.java b/forge-gui-desktop/src/test/java/forge/RunTest.java deleted file mode 100644 index ea75106a..00000000 --- a/forge-gui-desktop/src/test/java/forge/RunTest.java +++ /dev/null @@ -1,340 +0,0 @@ -package forge; - -import forge.game.card.Card; -import forge.game.combat.CombatUtil; -import org.testng.annotations.Test; - -/** - *

- * RunTest class. - *

- * - * @author Forge - * @version $Id: RunTest.java 24769 2014-02-09 13:56:04Z Hellfish $ - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class RunTest { - // @SuppressWarnings("unchecked") // HashSet needs - - /** - *

- * test. - *

- */ - @Test(timeOut = 1000, enabled = false) - void test() { - Card c; - //final CardFactoryInterface cf = Singletons.getModel().getCardFactory(); - // ********* test Card - /* - c = cf.getCard("Elvish Warrior", AllZone.getComputerPlayer()); - this.check("1", c.getOwner().isComputer()); - this.check("1.1", c.getName().equals("Elvish Warrior")); - this.check("2", c.getManaCost().equals("G G")); - this.check("2.1", c.isCreature()); - this.check("2.2", c.isType("Elf")); - this.check("2.3", c.isType("Warrior")); - this.check("3", c.getText().equals("")); - this.check("4", c.getNetPower() == 2); - this.check("5", c.getNetToughness() == 3); - this.check("6", c.getKeyword().isEmpty()); - - c = cf.getCard("Shock", null); - this.check("14", c.isInstant()); - // check("15", - // c.getText().equals("Shock deals 2 damge to target creature or player.")); - - c = cf.getCard("Bayou", null); - this.check("17", c.getManaCost().equals("")); - this.check("18", c.isLand()); - this.check("19", c.isType("Swamp")); - this.check("20", c.isType("Forest")); - - // ********* test ManaCost - ManaCost manaCost = new ManaCost("G"); - this.check("21", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.GREEN); - this.check("22", manaCost.isPaid()); - - manaCost = new ManaCost("7"); - this.check("23", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLACK); - this.check("24", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLUE); - this.check("25", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.GENERIC); - this.check("26", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.GREEN); - this.check("27", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.RED); - this.check("28", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.WHITE); - this.check("29", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.WHITE); - this.check("30", manaCost.isPaid()); - - manaCost = new ManaCost("2 W W G G B B U U R R"); - this.check("31", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.WHITE); - this.check("32", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.WHITE); - this.check("32.1", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLACK); - this.check("33", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLACK); - this.check("34", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLUE); - this.check("35", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLUE); - this.check("36", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.GREEN); - this.check("37", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.GREEN); - this.check("38", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.RED); - this.check("39", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.RED); - this.check("40", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.RED); - this.check("41", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLUE); - this.check("42", manaCost.isPaid()); - - manaCost = new ManaCost("G G"); - this.check("43", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.GREEN); - this.check("44", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.GREEN); - this.check("45", manaCost.isPaid()); - - manaCost = new ManaCost("1 U B"); - this.check("45", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLACK); - this.check("46", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLUE); - this.check("47", !manaCost.isPaid()); - manaCost.payMana(MagicColor.Constant.BLUE); - this.check("48", manaCost.isPaid()); - - // ********* test CardUtil.getColors() - c = new Card(); - c.setManaCost(new CardManaCost(new ManaCostParser("G"))); - ArrayList color = CardUtil.getColors(c); - this.check("49", color.contains(MagicColor.Constant.GREEN)); - this.check("50", color.size() == 1); - - c = new Card(); - c.setManaCost(new CardManaCost(new ManaCostParser("W B G R U"))); - color = CardUtil.getColors(c); - final Set set = new HashSet(color); - System.out.println("color: " + color); - this.check("51", set.size() == 5); - this.check("52", color.contains(MagicColor.Constant.BLACK)); - this.check("53", color.contains(MagicColor.Constant.BLUE)); - this.check("54", color.contains(MagicColor.Constant.GREEN)); - this.check("55", color.contains(MagicColor.Constant.RED)); - this.check("56", color.contains(MagicColor.Constant.WHITE)); - - c = new Card(); - c.setManaCost(new CardManaCost(new ManaCostParser("2"))); - color = CardUtil.getColors(c); - this.check("57", color.size() == 1); - this.check("58", color.contains(MagicColor.Constant.COLORLESS)); - - c = new Card(); - color = CardUtil.getColors(c); - this.check("59", color.size() == 1); - this.check("60", color.contains(MagicColor.Constant.COLORLESS)); - - c = new Card(); - c.setManaCost(new CardManaCost(new ManaCostParser(""))); - color = CardUtil.getColors(c); - this.check("61", color.size() == 1); - this.check("62", color.contains(MagicColor.Constant.COLORLESS)); - - c = cf.getCard("Bayou", null); - color = CardUtil.getColors(c); - this.check("63", color.size() == 1); - this.check("64", color.contains(MagicColor.Constant.COLORLESS)); - - c = cf.getCard("Elvish Warrior", null); - color = CardUtil.getColors(c); - this.check("65", color.size() == 1); - this.check("66", color.contains(MagicColor.Constant.GREEN)); - - c = new Card(); - c.setManaCost(new CardManaCost(new ManaCostParser("11 W W B B U U R R G G"))); - color = CardUtil.getColors(c); - this.check("67", color.size() == 5); - - c = new Card(); - c = cf.getCard("Elvish Warrior", null); - c.setManaCost(new CardManaCost(new ManaCostParser("11"))); - color = CardUtil.getColors(c); - this.check("68", color.size() == 1); - this.check("69", color.contains(MagicColor.Constant.COLORLESS)); - - this.check("70", c.isCreature()); - this.check("71", !c.isArtifact()); - this.check("72", !c.isBasicLand()); - this.check("73", !c.isEnchantment()); - this.check("74", !c.isGlobalEnchantment()); - this.check("75", !c.isInstant()); - this.check("76", !c.isLand()); - this.check("77", !c.isAura()); - this.check("78", c.isPermanent()); - this.check("79", !c.isSorcery()); - this.check("80", !c.isTapped()); - this.check("81", c.isUntapped()); - - c = cf.getCard("Swamp", null); - this.check("82", c.isBasicLand()); - this.check("83", c.isLand()); - - c = cf.getCard("Bayou", null); - this.check("84", !c.isBasicLand()); - this.check("85", c.isLand()); - - c = cf.getCard("Shock", null); - this.check("86", !c.isCreature()); - this.check("87", !c.isArtifact()); - this.check("88", !c.isBasicLand()); - this.check("89", !c.isEnchantment()); - this.check("90", !c.isGlobalEnchantment()); - this.check("91", c.isInstant()); - this.check("92", !c.isLand()); - this.check("93", !c.isAura()); - this.check("94", !c.isPermanent()); - this.check("95", !c.isSorcery()); - this.check("96", !c.isTapped()); - this.check("97", c.isUntapped()); - - // test Input_PayManaCostUtil - this.check("98", InputPayManaCostUtil.getLongColorString("G").equals(MagicColor.Constant.GREEN)); - this.check("99", InputPayManaCostUtil.getLongColorString("1").equals(MagicColor.Constant.COLORLESS)); -*/ - /* - * check("101", Input_PayManaCostUtil.isManaNeeded(MagicColor.Constant.Green, - * new ManaCost("5")) == true); check("102", - * Input_PayManaCostUtil.isManaNeeded(MagicColor.Constant.Blue, new - * ManaCost("4")) == true); check("103", - * Input_PayManaCostUtil.isManaNeeded(MagicColor.Constant.White, new - * ManaCost("3")) == true); check("104", - * Input_PayManaCostUtil.isManaNeeded(MagicColor.Constant.Black, new - * ManaCost("2")) == true); check("105", - * Input_PayManaCostUtil.isManaNeeded(MagicColor.Constant.Red, new - * ManaCost("1")) == true); - */ - /* - * ManaCost cost = new ManaCost("1 B B"); - * Input_PayManaCostUtil.isManaNeeded(MagicColor.Constant.Black, cost); - * cost.subtractMana(MagicColor.Constant.Black); - * cost.subtractMana(MagicColor.Constant.Green); check("106", - * Input_PayManaCostUtil.isManaNeeded(MagicColor.Constant.Green, cost) == - * false); - */ - - c = new Card(1, null); - Card c2 = new Card(2, null); - c.addIntrinsicKeyword("Flying"); - c2.addIntrinsicKeyword("Flying"); - // check("107", CombatUtil.canBlock(c, c2)); - // check("108", CombatUtil.canBlock(c2, c)); - - c = new Card(1, null); - c2 = new Card(2, null); - c2.addIntrinsicKeyword("Flying"); - this.check("109", CombatUtil.canBlock(c, c2)); - this.check("110", !CombatUtil.canBlock(c2, c)); -/* - c = cf.getCard("Fyndhorn Elves", null); - c2 = cf.getCard("Talas Warrior", null); - this.check("110a", !CombatUtil.canBlock(c2, c)); - this.check("110b", CombatUtil.canBlock(c, c2)); - - c = new Card(); - c.setName("1"); - c.setUniqueNumber(1); - c2 = new Card(); - c2.setName("2"); - c2.setUniqueNumber(2); - - // test CardList - final List cardList = new ArrayList(Arrays.asList(new Card[] { c, c2 })); - this.check("111", cardList.contains(c)); - this.check("112", cardList.contains(c2)); - this.check("113", cardList.containsName(c)); - this.check("114", cardList.containsName(c.getName())); - this.check("115", cardList.containsName(c2)); - this.check("116", cardList.containsName(c2.getName())); - - c = new Card(); - this.check("117", c.hasSickness()); - c.addIntrinsicKeyword("Haste"); - this.check("118", !c.hasSickness()); - - final CardFactoryInterface cf1 = AllZone.getCardFactory(); - final List c1 = new ArrayList(); - c1.add(cf1.getCard("Shock", null)); - c1.add(cf1.getCard("Royal Assassin", null)); - c1.add(cf1.getCard("Hymn to Tourach", null)); - - List c3 = c1.filter(new Predicate() { - @Override - public boolean isTrue(final Card c) { - return c.isCreature(); - } - }); - this.check("119", c3.containsName("Royal Assassin")); - this.check("119", c3.size() == 1); - - c3 = c1.filter(new Predicate() { - @Override - public boolean isTrue(final Card c) { - return c.isInstant(); - } - }); - this.check("120", c3.containsName("Shock")); - this.check("121", c3.size() == 1); - - c3 = c1.filter(new Predicate() { - @Override - public boolean isTrue(final Card c) { - return c.getName().equals("Hymn to Tourach"); - } - }); - this.check("120", c3.containsName("Hymn to Tourach")); - this.check("121", c3.size() == 1); - - final Card card = cf1.getCard("Sylvan Basilisk", null); - final Card card2 = cf1.getCard("Exalted Angel", null); - - this.check("121a", !CombatUtil.canDestroyAttacker(card, card2, null, false)); - - this.check("122", CardUtil.getConvertedManaCost("0") == 0); - this.check("123", CardUtil.getConvertedManaCost("R") == 1); - this.check("124", CardUtil.getConvertedManaCost("R R") == 2); - this.check("125", CardUtil.getConvertedManaCost("R R R") == 3); - this.check("126", CardUtil.getConvertedManaCost("1") == 1); - this.check("127", CardUtil.getConvertedManaCost("2/R 2/G 2/W 2/B 2/U") == 10); - */ - } // test() - - /** - *

- * check. - *

- * - * @param message - * a {@link java.lang.String} object. - * @param ok - * a boolean. - */ - void check(final String message, final boolean ok) { - if (!ok) { - // throw new RuntimeException("RunTest test error : " +message); - System.out.println("RunTest test error : " + message); - } - - } -} diff --git a/forge-gui-desktop/src/test/java/forge/TinyTest.java b/forge-gui-desktop/src/test/java/forge/TinyTest.java deleted file mode 100644 index 18de236a..00000000 --- a/forge-gui-desktop/src/test/java/forge/TinyTest.java +++ /dev/null @@ -1,21 +0,0 @@ -package forge; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * This test mostly exists to test TestNG itself. - * - * @author Forge - * @version $Id: TinyTest.java 11726 2011-11-03 16:16:33Z jendave $ - */ -@Test(groups = { "UnitTest" }) -public class TinyTest { - /** - * Just a quick test to see if TestNG and Assert are working. - */ - @Test(groups = { "UnitTest", "fast" }) - public void test_true() { - Assert.assertTrue(true); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/ai/simulation/GameSimulatorTest.java b/forge-gui-desktop/src/test/java/forge/ai/simulation/GameSimulatorTest.java deleted file mode 100644 index a4b6585c..00000000 --- a/forge-gui-desktop/src/test/java/forge/ai/simulation/GameSimulatorTest.java +++ /dev/null @@ -1,1352 +0,0 @@ -package forge.ai.simulation; - -import com.google.common.collect.Lists; -import forge.ai.ComputerUtilAbility; -import forge.card.CardStateName; -import forge.card.MagicColor; -import forge.game.Game; -import forge.game.card.Card; -import forge.game.card.CardCollection; -import forge.game.card.CounterType; -import forge.game.phase.PhaseType; -import forge.game.player.Player; -import forge.game.spellability.SpellAbility; -import forge.game.zone.ZoneType; - -import java.util.List; - -public class GameSimulatorTest extends SimulationTestCase { - - public void testActivateAbilityTriggers() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Plains", p); - addCard("Plains", p); - addCard("Plains", p); - String heraldCardName = "Herald of Anafenza"; - Card herald = addCard(heraldCardName, p); - herald.setSickness(false); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - - SpellAbility outlastSA = findSAWithPrefix(herald, "Outlast"); - assertNotNull(outlastSA); - - GameSimulator sim = createSimulator(game, p); - int score = sim.simulateSpellAbility(outlastSA).value; - assertTrue(score > 0); - Game simGame = sim.getSimulatedGameState(); - - Card heraldCopy = findCardWithName(simGame, heraldCardName); - assertNotNull(heraldCopy); - assertTrue(heraldCopy.isTapped()); - assertTrue(heraldCopy.hasCounters()); - assertEquals(1, heraldCopy.getToughnessBonusFromCounters()); - assertEquals(1, heraldCopy.getPowerBonusFromCounters()); - - Card warriorToken = findCardWithName(simGame, "Warrior"); - assertNotNull(warriorToken); - assertTrue(warriorToken.isSick()); - assertEquals(1, warriorToken.getCurrentPower()); - assertEquals(1, warriorToken.getCurrentToughness()); - } - - public void testStaticAbilities() { - String sliverCardName = "Sidewinder Sliver"; - String heraldCardName = "Herald of Anafenza"; - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card sliver = addCard(sliverCardName, p); - sliver.setSickness(false); - Card herald = addCard(heraldCardName, p); - herald.setSickness(false); - addCard("Plains", p); - addCard("Plains", p); - addCard("Plains", p); - addCard("Spear of Heliod", p); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - game.getAction().checkStateEffects(true); - - assertEquals(1, sliver.getAmountOfKeyword("Flanking")); - assertEquals(2, sliver.getNetPower()); - assertEquals(2, sliver.getNetToughness()); - - SpellAbility outlastSA = findSAWithPrefix(herald, "Outlast"); - assertNotNull(outlastSA); - - GameSimulator sim = createSimulator(game, p); - int score = sim.simulateSpellAbility(outlastSA).value; - assertTrue(score > 0); - Game simGame = sim.getSimulatedGameState(); - Card sliverCopy = findCardWithName(simGame, sliverCardName); - assertEquals(1, sliverCopy.getAmountOfKeyword("Flanking")); - assertEquals(2, sliver.getNetPower()); - assertEquals(2, sliver.getNetToughness()); - } - - public void testStaticEffectsMonstrous() { - String lionCardName = "Fleecemane Lion"; - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card lion = addCard(lionCardName, p); - lion.setSickness(false); - lion.setMonstrous(true); - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - assertTrue(lion.isMonstrous()); - assertEquals(1, lion.getAmountOfKeyword("Hexproof")); - assertEquals(1, lion.getAmountOfKeyword("Indestructible")); - - GameSimulator sim = createSimulator(game, p); - Game simGame = sim.getSimulatedGameState(); - Card lionCopy = findCardWithName(simGame, lionCardName); - assertTrue(lionCopy.isMonstrous()); - assertEquals(1, lionCopy.getAmountOfKeyword("Hexproof")); - assertEquals(1, lionCopy.getAmountOfKeyword("Indestructible")); - } - - public void testEquippedAbilities() { - String bearCardName = "Runeclaw Bear"; - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card bear = addCard(bearCardName, p); - bear.setSickness(false); - Card cloak = addCard("Whispersilk Cloak", p); - cloak.equipCard(bear); - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - assertEquals(1, bear.getAmountOfKeyword("Unblockable")); - - GameSimulator sim = createSimulator(game, p); - Game simGame = sim.getSimulatedGameState(); - Card bearCopy = findCardWithName(simGame, bearCardName); - assertEquals(1, bearCopy.getAmountOfKeyword("Unblockable")); - } - - public void testEnchantedAbilities() { - String bearCardName = "Runeclaw Bear"; - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card bear = addCard(bearCardName, p); - bear.setSickness(false); - Card lifelink = addCard("Lifelink", p); - lifelink.enchantEntity(bear); - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - assertEquals(1, bear.getAmountOfKeyword("Lifelink")); - - GameSimulator sim = createSimulator(game, p); - Game simGame = sim.getSimulatedGameState(); - Card bearCopy = findCardWithName(simGame, bearCardName); - assertEquals(1, bearCopy.getAmountOfKeyword("Lifelink")); - } - - public void testEtbTriggers() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Black Knight", p); - for (int i = 0; i < 5; i++) - addCard("Swamp", p); - - String merchantCardName = "Gray Merchant of Asphodel"; - Card c = addCardToZone(merchantCardName, p, ZoneType.Hand); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbility playMerchantSa = c.getSpellAbilities().get(0); - playMerchantSa.setActivatingPlayer(p); - - GameSimulator sim = createSimulator(game, p); - int origScore = sim.getScoreForOrigGame().value; - int score = sim.simulateSpellAbility(playMerchantSa).value; - assertTrue(String.format("score=%d vs. origScore=%d", score, origScore), score > origScore); - Game simGame = sim.getSimulatedGameState(); - assertEquals(24, simGame.getPlayers().get(1).getLife()); - assertEquals(16, simGame.getPlayers().get(0).getLife()); - } - - public void testSimulateUnmorph() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card ripper = createCard("Ruthless Ripper", p); - ripper.setState(CardStateName.FaceDown, true); - p.getZone(ZoneType.Battlefield).add(ripper); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertEquals(20, game.getPlayers().get(0).getLife()); - - GameSimulator sim = createSimulator(game, p); - Game simGame = sim.getSimulatedGameState(); - - SpellAbility unmorphSA = findSAWithPrefix(ripper, "Morph—Reveal a black card"); - assertNotNull(unmorphSA); - sim.simulateSpellAbility(unmorphSA); - assertEquals(18, simGame.getPlayers().get(0).getLife()); - } - - public void testFindingOwnCard() { - Game game = initAndCreateGame(); - Player p0 = game.getPlayers().get(0); - Player p1 = game.getPlayers().get(1); - addCardToZone("Skull Fracture", p0, ZoneType.Hand); - addCardToZone("Runeclaw Bear", p0, ZoneType.Hand); - Card fractureP1 = addCardToZone("Skull Fracture", p1, ZoneType.Hand); - addCard("Swamp", p1); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p1); - game.getAction().checkStateEffects(true); - - GameSimulator sim = createSimulator(game, p1); - Game simGame = sim.getSimulatedGameState(); - - SpellAbility fractureSa = fractureP1.getSpellAbilities().get(0); - assertNotNull(fractureSa); - fractureSa.getTargets().add(p0); - sim.simulateSpellAbility(fractureSa); - assertEquals(1, simGame.getPlayers().get(0).getCardsIn(ZoneType.Hand).size()); - assertEquals(0, simGame.getPlayers().get(1).getCardsIn(ZoneType.Hand).size()); - } - - public void testPlaneswalkerAbilities() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card sorin = addCard("Sorin, Solemn Visitor", p); - sorin.addCounter(CounterType.LOYALTY, 5, sorin, false); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - CardCollection cards = ComputerUtilAbility.getAvailableCards(game, p); - List abilities = ComputerUtilAbility.getSpellAbilities(cards, p); - SpellAbility minusTwo = findSAWithPrefix(abilities, "-2: Create a 2/2 black Vampire"); - assertNotNull(minusTwo); - minusTwo.setActivatingPlayer(p); - assertTrue(minusTwo.canPlay()); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(minusTwo); - Game simGame = sim.getSimulatedGameState(); - Card vampireToken = findCardWithName(simGame, "Vampire"); - assertNotNull(vampireToken); - - Player simP = simGame.getPlayers().get(1); - cards = ComputerUtilAbility.getAvailableCards(simGame, simP); - abilities = ComputerUtilAbility.getSpellAbilities(cards, simP); - SpellAbility minusTwoSim = findSAWithPrefix(abilities, "-2: Create a 2/2 black Vampire"); - assertNotNull(minusTwoSim); - minusTwoSim.setActivatingPlayer(simP); - assertFalse(minusTwoSim.canPlay()); - assertEquals(1, minusTwoSim.getActivationsThisTurn()); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Player copyP = copy.getPlayers().get(1); - cards = ComputerUtilAbility.getAvailableCards(copy, copyP); - abilities = ComputerUtilAbility.getSpellAbilities(cards, copyP); - SpellAbility minusTwoCopy = findSAWithPrefix(abilities, "-2: Create a 2/2 black Vampire"); - minusTwoCopy.setActivatingPlayer(copyP); - assertFalse(minusTwoCopy.canPlay()); - assertEquals(1, minusTwoCopy.getActivationsThisTurn()); - } - - public void testPlaneswalkerEmblems() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - String bearCardName = "Runeclaw Bear"; - addCard(bearCardName, p); - Card gideon = addCard("Gideon, Ally of Zendikar", p); - gideon.addCounter(CounterType.LOYALTY, 4, gideon, false); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - CardCollection cards = ComputerUtilAbility.getAvailableCards(game, p); - List abilities = ComputerUtilAbility.getSpellAbilities(cards, p); - SpellAbility minusFour = findSAWithPrefix(abilities, "-4: You get an emblem"); - assertNotNull(minusFour); - minusFour.setActivatingPlayer(p); - assertTrue(minusFour.canPlay()); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(minusFour); - Game simGame = sim.getSimulatedGameState(); - Card simBear = findCardWithName(simGame, bearCardName); - assertEquals(3, simBear.getNetPower()); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Card copyBear = findCardWithName(copy, bearCardName); - assertEquals(3, copyBear.getNetPower()); - } - - public void testManifest() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Plains", p); - addCard("Plains", p); - Card soulSummons = addCardToZone("Soul Summons", p, ZoneType.Hand); - addCardToZone("Ornithopter", p, ZoneType.Library); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbility manifestSA = soulSummons.getSpellAbilities().get(0); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(manifestSA); - Game simGame = sim.getSimulatedGameState(); - Card manifestedCreature = findCardWithName(simGame, ""); - assertNotNull(manifestedCreature); - - SpellAbility unmanifestSA = findSAWithPrefix(manifestedCreature, "Unmanifest"); - assertNotNull(unmanifestSA); - assertEquals(2, manifestedCreature.getNetPower()); - assertFalse(manifestedCreature.hasKeyword("Flying")); - - GameSimulator sim2 = createSimulator(simGame, simGame.getPlayers().get(1)); - sim2.simulateSpellAbility(unmanifestSA); - Game simGame2 = sim2.getSimulatedGameState(); - Card ornithopter = findCardWithName(simGame2, "Ornithopter"); - assertEquals(0, ornithopter.getNetPower()); - assertTrue(ornithopter.hasKeyword("Flying")); - assertNull(findSAWithPrefix(ornithopter, "Unmanifest")); - - GameCopier copier = new GameCopier(simGame2); - Game copy = copier.makeCopy(); - Card ornithopterCopy = findCardWithName(copy, "Ornithopter"); - assertNull(findSAWithPrefix(ornithopterCopy, "Unmanifest")); - } - - public void testManifest2() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Plains", p); - addCard("Plains", p); - Card soulSummons = addCardToZone("Soul Summons", p, ZoneType.Hand); - addCardToZone("Plains", p, ZoneType.Library); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbility manifestSA = soulSummons.getSpellAbilities().get(0); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(manifestSA); - Game simGame = sim.getSimulatedGameState(); - Card manifestedCreature = findCardWithName(simGame, ""); - assertNotNull(manifestedCreature); - assertNull(findSAWithPrefix(manifestedCreature, "Unmanifest")); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Card manifestedCreatureCopy = findCardWithName(copy, ""); - assertNull(findSAWithPrefix(manifestedCreatureCopy, "Unmanifest")); - } - - public void testManifest3() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Plains", p); - addCard("Plains", p); - Card soulSummons = addCardToZone("Soul Summons", p, ZoneType.Hand); - addCardToZone("Dryad Arbor", p, ZoneType.Library); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbility manifestSA = soulSummons.getSpellAbilities().get(0); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(manifestSA); - Game simGame = sim.getSimulatedGameState(); - Card manifestedCreature = findCardWithName(simGame, ""); - assertNotNull(manifestedCreature); - assertNull(findSAWithPrefix(manifestedCreature, "Unmanifest")); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Card manifestedCreatureCopy = findCardWithName(copy, ""); - assertNull(findSAWithPrefix(manifestedCreatureCopy, "Unmanifest")); - } - - public void testTypeOfPermanentChanging() { - String sarkhanCardName = "Sarkhan, the Dragonspeaker"; - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card sarkhan = addCard(sarkhanCardName, p); - sarkhan.addCounter(CounterType.LOYALTY, 4, sarkhan, false); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertFalse(sarkhan.isCreature()); - assertTrue(sarkhan.isPlaneswalker()); - - SpellAbility becomeDragonSA = findSAWithPrefix(sarkhan, "+1"); - assertNotNull(becomeDragonSA); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(becomeDragonSA); - Game simGame = sim.getSimulatedGameState(); - Card sarkhanSim = findCardWithName(simGame, sarkhanCardName); - assertTrue(sarkhanSim.isCreature()); - assertFalse(sarkhanSim.isPlaneswalker()); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Card sarkhanCopy = findCardWithName(copy, sarkhanCardName); - assertTrue(sarkhanCopy.isCreature()); - assertFalse(sarkhanCopy.isPlaneswalker()); - } - - public void testDistributeCountersAbility() { - String ajaniCardName = "Ajani, Mentor of Heroes"; - String ornithoperCardName = "Ornithopter"; - String bearCardName = "Runeclaw Bear"; - - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard(ornithoperCardName, p); - addCard(bearCardName, p); - Card ajani = addCard(ajaniCardName, p); - ajani.addCounter(CounterType.LOYALTY, 4, ajani, false); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbility sa = findSAWithPrefix(ajani, "+1: Distribute"); - assertNotNull(sa); - sa.setActivatingPlayer(p); - - MultiTargetSelector selector = new MultiTargetSelector(sa, null); - while (selector.selectNextTargets()) { - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(sa); - Game simGame = sim.getSimulatedGameState(); - Card thopterSim = findCardWithName(simGame, ornithoperCardName); - Card bearSim = findCardWithName(simGame, bearCardName); - assertEquals(3, thopterSim.getCounters(CounterType.P1P1) + bearSim.getCounters(CounterType.P1P1)); - } - } - - public void testDamagePreventedTrigger() { - String ajaniCardName = "Ajani Steadfast"; - String selflessCardName = "Selfless Squire"; - - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - addCard(selflessCardName, p); - addCard("Mountain", p); - Card boltCard = addCardToZone("Lightning Bolt", p, ZoneType.Hand); - SpellAbility boltSA = boltCard.getFirstSpellAbility(); - - Card ajani = addCard(ajaniCardName, p); - ajani.addCounter(CounterType.LOYALTY, 8, ajani, false); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - - SpellAbility sa = findSAWithPrefix(ajani, "-7:"); - assertNotNull(sa); - sa.setActivatingPlayer(p); - - GameSimulator sim = createSimulator(game, p); - boltSA.getTargets().add(p); - sim.simulateSpellAbility(sa); - sim.simulateSpellAbility(boltSA); - Game simGame = sim.getSimulatedGameState(); - Card simSelfless = findCardWithName(simGame, selflessCardName); - - // only one damage - assertEquals(19, simGame.getPlayers().get(0).getLife()); - - // only triggered once - assertTrue(simSelfless.hasCounters()); - assertEquals(2, simSelfless.getCounters(CounterType.P1P1)); - assertEquals(2, simSelfless.getToughnessBonusFromCounters()); - assertEquals(2, simSelfless.getPowerBonusFromCounters()); - } - - public void testChosenColors() { - String bearCardName = "Runeclaw Bear"; - - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Card bear = addCard(bearCardName, p); - Card hall = addCard("Hall of Triumph", p); - hall.setChosenColors(Lists.newArrayList("green")); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - assertEquals(3, bear.getNetToughness()); - - GameCopier copier = new GameCopier(game); - Game copy = copier.makeCopy(); - Card bearCopy = findCardWithName(copy, bearCardName); - assertEquals(3, bearCopy.getNetToughness()); - } - - public void testDarkDepthsCopy() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Swamp", p); - addCard("Swamp", p); - Card depths = addCard("Dark Depths", p); - depths.addCounter(CounterType.ICE, 10, depths, false); - Card thespian = addCard("Thespian's Stage", p); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - assertTrue(depths.hasCounters()); - - SpellAbility sa = findSAWithPrefix(thespian, "{2}, {T}: CARDNAME becomes a copy of target land and gains this ability."); - assertNotNull(sa); - sa.getTargets().add(depths); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(sa); - Game simGame = sim.getSimulatedGameState(); - - String strSimGame = gameStateToString(simGame); - assertNull(strSimGame, findCardWithName(simGame, "Dark Depths")); - assertNull(strSimGame, findCardWithName(simGame, "Thespian's Stage")); - assertNotNull(strSimGame, findCardWithName(simGame, "Marit Lage")); - } - - public void testThespianStageSelfCopy() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Swamp", p); - addCard("Swamp", p); - Card thespian = addCard("Thespian's Stage", p); - assertTrue(thespian.isLand()); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbility sa = findSAWithPrefix(thespian, "{2}, {T}: CARDNAME becomes a copy of target land and gains this ability."); - assertNotNull(sa); - sa.getTargets().add(thespian); - - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(sa); - Game simGame = sim.getSimulatedGameState(); - Card thespianSim = findCardWithName(simGame, "Thespian's Stage"); - assertNotNull(gameStateToString(simGame), thespianSim); - assertTrue(thespianSim.isLand()); - } - - public void testDash() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCard("Mountain", p); - String berserkerCardName = "Lightning Berserker"; - Card berserkerCard = addCardToZone(berserkerCardName, p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - - SpellAbility dashSA = findSAWithPrefix(berserkerCard, "Dash"); - assertNotNull(dashSA); - - GameSimulator sim = createSimulator(game, p); - int score = sim.simulateSpellAbility(dashSA).value; - assertTrue(score > 0); - Game simGame = sim.getSimulatedGameState(); - - Card berserker = findCardWithName(simGame, berserkerCardName); - assertNotNull(berserker); - assertEquals(1, berserker.getNetPower()); - assertEquals(1, berserker.getNetToughness()); - assertFalse(berserker.isSick()); - - SpellAbility pumpSA = findSAWithPrefix(berserker, "{R}: CARDNAME gets +1/+0 until end of turn."); - assertNotNull(pumpSA); - GameSimulator sim2 = createSimulator(simGame, (Player) sim.getGameCopier().find(p)); - sim2.simulateSpellAbility(pumpSA); - Game simGame2 = sim2.getSimulatedGameState(); - - Card berserker2 = findCardWithName(simGame2, berserkerCardName); - assertNotNull(berserker2); - assertEquals(2, berserker2.getNetPower()); - assertEquals(1, berserker2.getNetToughness()); - assertFalse(berserker2.isSick()); - } - - public void testTokenAbilities() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Forest", p); - addCard("Forest", p); - addCard("Forest", p); - Card callTheScionsCard = addCardToZone("Call the Scions", p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - - SpellAbility callTheScionsSA = callTheScionsCard.getSpellAbilities().get(0); - - GameSimulator sim = createSimulator(game, p); - int score = sim.simulateSpellAbility(callTheScionsSA).value; - assertTrue(score > 0); - Game simGame = sim.getSimulatedGameState(); - - Card scion = findCardWithName(simGame, "Eldrazi Scion"); - assertNotNull(scion); - assertEquals(1, scion.getNetPower()); - assertEquals(1, scion.getNetToughness()); - assertTrue(scion.isSick()); - assertNotNull(findSAWithPrefix(scion, "Sacrifice CARDNAME: Add {C} to your mana pool.")); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Card scionCopy = findCardWithName(copy, "Eldrazi Scion"); - assertNotNull(scionCopy); - assertEquals(1, scionCopy.getNetPower()); - assertEquals(1, scionCopy.getNetToughness()); - assertTrue(scionCopy.isSick()); - assertNotNull(findSAWithPrefix(scionCopy, "Sacrifice CARDNAME: Add {C} to your mana pool.")); - } - - public void testMarkedDamage() { - // Marked damage is important, as it's used during the AI declare attackers logic - // which affects game state score - since P/T boosts are evaluated differently for - // creatures participating in combat. - - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - String giantCardName = "Hill Giant"; - Card giant = addCard(giantCardName, p); - addCard("Mountain", p); - Card shockCard = addCardToZone("Shock", p, ZoneType.Hand); - SpellAbility shockSA = shockCard.getFirstSpellAbility(); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertEquals(3, giant.getNetPower()); - assertEquals(3, giant.getNetToughness()); - assertEquals(0, giant.getDamage()); - - GameSimulator sim = createSimulator(game, p); - shockSA.setTargetCard(giant); - sim.simulateSpellAbility(shockSA); - Game simGame = sim.getSimulatedGameState(); - Card simGiant = findCardWithName(simGame, giantCardName); - assertEquals(2, simGiant.getDamage()); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Card giantCopy = findCardWithName(copy, giantCardName); - assertEquals(2, giantCopy.getDamage()); - } - - public void testLifelinkDamageSpell() { - Game game = initAndCreateGame(); - Player p1 = game.getPlayers().get(0); - Player p2 = game.getPlayers().get(1); - - String kalitasName = "Kalitas, Traitor of Ghet"; - String pridemateName = "Ajani's Pridemate"; - String indestructibilityName = "Indestructibility"; - String ignitionName = "Chandra's Ignition"; - String broodName = "Brood Monitor"; - - // enough to cast Chandra's Ignition - for (int i = 0; i < 5; ++i) { - addCard("Mountain", p1); - } - - Card kalitas = addCard(kalitasName, p1); - Card pridemate = addCard(pridemateName, p1); - Card indestructibility = addCard(indestructibilityName, p1); - - indestructibility.enchantEntity(pridemate); - - Card ignition = addCardToZone(ignitionName, p1, ZoneType.Hand); - SpellAbility ignitionSA = ignition.getFirstSpellAbility(); - - addCard(broodName, p2); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p1); - game.getAction().checkStateEffects(true); - - GameSimulator sim = createSimulator(game, p1); - ignitionSA.setTargetCard(kalitas); - sim.simulateSpellAbility(ignitionSA); - Game simGame = sim.getSimulatedGameState(); - Card simKalitas = findCardWithName(simGame, kalitasName); - Card simPridemate = findCardWithName(simGame, pridemateName); - Card simBrood = findCardWithName(simGame, broodName); - - // because it was destroyed - assertNull(simBrood); - - assertEquals(0, simKalitas.getDamage()); - assertEquals(3, simPridemate.getDamage()); - - // only triggered once - assertTrue(simPridemate.hasCounters()); - assertEquals(1, simPridemate.getCounters(CounterType.P1P1)); - assertEquals(1, simPridemate.getToughnessBonusFromCounters()); - assertEquals(1, simPridemate.getPowerBonusFromCounters()); - - // 3 times 3 damage with life gain = 9 + 20 = 29 - assertEquals(29, simGame.getPlayers().get(0).getLife()); - assertEquals(17, simGame.getPlayers().get(1).getLife()); - } - - public void testLifelinkDamageSpellMultiplier() { - Game game = initAndCreateGame(); - Player p1 = game.getPlayers().get(0); - Player p2 = game.getPlayers().get(1); - - String kalitasName = "Kalitas, Traitor of Ghet"; - String pridemateName = "Ajani's Pridemate"; - String giselaName = "Gisela, Blade of Goldnight"; - String ignitionName = "Chandra's Ignition"; - String broodName = "Brood Monitor"; - - // enough to cast Chandra's Ignition - for (int i = 0; i < 5; ++i) { - addCard("Mountain", p1); - } - - Card kalitas = addCard(kalitasName, p1); - addCard(pridemateName, p1); - addCard(giselaName, p1); - - Card ignition = addCardToZone(ignitionName, p1, ZoneType.Hand); - SpellAbility ignitionSA = ignition.getFirstSpellAbility(); - - addCard(broodName, p2); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p1); - game.getAction().checkStateEffects(true); - - GameSimulator sim = createSimulator(game, p1); - ignitionSA.setTargetCard(kalitas); - sim.simulateSpellAbility(ignitionSA); - Game simGame = sim.getSimulatedGameState(); - Card simKalitas = findCardWithName(simGame, kalitasName); - Card simPridemate = findCardWithName(simGame, pridemateName); - Card simGisela = findCardWithName(simGame, giselaName); - Card simBrood = findCardWithName(simGame, broodName); - - // because it was destroyed - assertNull(simBrood); - - assertEquals(0, simKalitas.getDamage()); - // 2 of the 3 are prevented - assertEquals(1, simPridemate.getDamage()); - assertEquals(1, simGisela.getDamage()); - - // only triggered once - assertTrue(simPridemate.hasCounters()); - assertEquals(1, simPridemate.getCounters(CounterType.P1P1)); - assertEquals(1, simPridemate.getToughnessBonusFromCounters()); - assertEquals(1, simPridemate.getPowerBonusFromCounters()); - - // 2 times 3 / 2 rounded down = 2 * 1 = 2 - // 2 times 3 * 2 = 12 - assertEquals(34, simGame.getPlayers().get(0).getLife()); - assertEquals(14, simGame.getPlayers().get(1).getLife()); - } - - public void testLifelinkDamageSpellRedirected() { - Game game = initAndCreateGame(); - Player p1 = game.getPlayers().get(0); - Player p2 = game.getPlayers().get(1); - - String kalitasName = "Kalitas, Traitor of Ghet"; - String pridemateName = "Ajani's Pridemate"; - String indestructibilityName = "Indestructibility"; - String ignitionName = "Chandra's Ignition"; - String broodName = "Brood Monitor"; - String palisadeName = "Palisade Giant"; - - // enough to cast Chandra's Ignition - for (int i = 0; i < 5; ++i) { - addCard("Mountain", p1); - } - - Card kalitas = addCard(kalitasName, p1); - Card pridemate = addCard(pridemateName, p1); - Card indestructibility = addCard(indestructibilityName, p1); - - indestructibility.enchantEntity(pridemate); - - Card ignition = addCardToZone(ignitionName, p1, ZoneType.Hand); - SpellAbility ignitionSA = ignition.getFirstSpellAbility(); - - addCard(broodName, p2); - addCard(palisadeName, p2); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p1); - game.getAction().checkStateEffects(true); - - GameSimulator sim = createSimulator(game, p1); - ignitionSA.setTargetCard(kalitas); - sim.simulateSpellAbility(ignitionSA); - Game simGame = sim.getSimulatedGameState(); - Card simKalitas = findCardWithName(simGame, kalitasName); - Card simPridemate = findCardWithName(simGame, pridemateName); - Card simBrood = findCardWithName(simGame, broodName); - Card simPalisade = findCardWithName(simGame, palisadeName); - - // not destroyed because damage redirected - assertNotNull(simBrood); - assertEquals(0, simBrood.getDamage()); - - //destoryed because of to much redirected damage - assertNull(simPalisade); - - assertEquals(0, simKalitas.getDamage()); - assertEquals(3, simPridemate.getDamage()); - - // only triggered once - assertTrue(simPridemate.hasCounters()); - assertEquals(1, simPridemate.getCounters(CounterType.P1P1)); - assertEquals(1, simPridemate.getToughnessBonusFromCounters()); - assertEquals(1, simPridemate.getPowerBonusFromCounters()); - - // 4 times 3 damage with life gain = 12 + 20 = 32 - assertEquals(32, simGame.getPlayers().get(0).getLife()); - assertEquals(20, simGame.getPlayers().get(1).getLife()); - } - - public void testLifelinkDamageSpellMultipleDamage() { - Game game = initAndCreateGame(); - Player p1 = game.getPlayers().get(0); - Player p2 = game.getPlayers().get(1); - - String soulfireName = "Soulfire Grand Master"; - String pridemateName = "Ajani's Pridemate"; - String coneName = "Cone of Flame"; - - String bearCardName = "Runeclaw Bear"; - String giantCardName = "Hill Giant"; - - String tormentName = "Everlasting Torment"; - String meliraName = "Melira, Sylvok Outcast"; - - // enough to cast Cone of Flame - for (int i = 0; i < 5; ++i) { - addCard("Mountain", p1); - } - - addCard(soulfireName, p1); - addCard(pridemateName, p1); - - Card bearCard = addCard(bearCardName, p2); - Card giantCard = addCard(giantCardName, p2); - - Card cone = addCardToZone(coneName, p1, ZoneType.Hand); - SpellAbility coneSA = cone.getFirstSpellAbility(); - - coneSA.setTargetCard(bearCard); // one damage to bear - coneSA.getSubAbility().setTargetCard(giantCard); // two damage to giant - coneSA.getSubAbility().getSubAbility().getTargets().add(p2); // three damage to player - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p1); - game.getAction().checkStateEffects(true); - - GameSimulator sim = createSimulator(game, p1); - - sim.simulateSpellAbility(coneSA); - Game simGame = sim.getSimulatedGameState(); - Card simBear = findCardWithName(simGame, bearCardName); - Card simGiant = findCardWithName(simGame, giantCardName); - Card simPridemate = findCardWithName(simGame, pridemateName); - - // spell deals multiple damages to multiple targets, each of them causes lifegain - assertNotNull(simPridemate); - assertTrue(simPridemate.hasCounters()); - assertEquals(3, simPridemate.getCounters(CounterType.P1P1)); - assertEquals(3, simPridemate.getToughnessBonusFromCounters()); - assertEquals(3, simPridemate.getPowerBonusFromCounters()); - - assertNotNull(simBear); - assertEquals(1, simBear.getDamage()); - - assertNotNull(simGiant); - assertEquals(2, simGiant.getDamage()); - - // 1 + 2 + 3 lifegain - assertEquals(26, simGame.getPlayers().get(0).getLife()); - assertEquals(17, simGame.getPlayers().get(1).getLife()); - - // second pard with Everlasting Torment - addCard(tormentName, p2); - - GameSimulator sim2 = createSimulator(game, p1); - - sim2.simulateSpellAbility(coneSA); - Game simGame2 = sim2.getSimulatedGameState(); - Card simBear2 = findCardWithName(simGame2, bearCardName); - Card simGiant2 = findCardWithName(simGame2, giantCardName); - Card simPridemate2 = findCardWithName(simGame2, pridemateName); - - // no Lifegain because of Everlasting Torment - assertNotNull(simPridemate2); - assertFalse(simPridemate2.hasCounters()); - assertEquals(0, simPridemate2.getCounters(CounterType.P1P1)); - assertEquals(0, simPridemate2.getToughnessBonusFromCounters()); - assertEquals(0, simPridemate2.getPowerBonusFromCounters()); - - assertNotNull(simBear2); - assertEquals(0, simBear2.getDamage()); - assertTrue(simBear2.hasCounters()); - assertEquals(1, simBear2.getCounters(CounterType.M1M1)); - assertEquals(-1, simBear2.getToughnessBonusFromCounters()); - assertEquals(-1, simBear2.getPowerBonusFromCounters()); - - assertNotNull(simGiant2); - assertEquals(0, simGiant2.getDamage()); - assertTrue(simGiant2.hasCounters()); - assertEquals(2, simGiant2.getCounters(CounterType.M1M1)); - assertEquals(-2, simGiant2.getToughnessBonusFromCounters()); - assertEquals(-2, simGiant2.getPowerBonusFromCounters()); - - // no life gain - assertEquals(20, simGame2.getPlayers().get(0).getLife()); - assertEquals(17, simGame2.getPlayers().get(1).getLife()); - - // third pard with Melira prevents wither - addCard(meliraName, p2); - - GameSimulator sim3 = createSimulator(game, p1); - - sim3.simulateSpellAbility(coneSA); - Game simGame3 = sim3.getSimulatedGameState(); - Card simBear3 = findCardWithName(simGame3, bearCardName); - Card simGiant3 = findCardWithName(simGame3, giantCardName); - Card simPridemate3 = findCardWithName(simGame3, pridemateName); - - // no Lifegain because of Everlasting Torment - assertNotNull(simPridemate3); - assertFalse(simPridemate3.hasCounters()); - assertEquals(0, simPridemate3.getCounters(CounterType.P1P1)); - assertEquals(0, simPridemate3.getToughnessBonusFromCounters()); - assertEquals(0, simPridemate3.getPowerBonusFromCounters()); - - assertNotNull(simBear3); - assertEquals(0, simBear3.getDamage()); - assertFalse(simBear3.hasCounters()); - assertEquals(0, simBear3.getCounters(CounterType.M1M1)); - assertEquals(0, simBear3.getToughnessBonusFromCounters()); - assertEquals(0, simBear3.getPowerBonusFromCounters()); - - assertNotNull(simGiant3); - assertEquals(0, simGiant3.getDamage()); - assertFalse(simGiant3.hasCounters()); - assertEquals(0, simGiant3.getCounters(CounterType.M1M1)); - assertEquals(0, simGiant3.getToughnessBonusFromCounters()); - assertEquals(0, simGiant3.getPowerBonusFromCounters()); - - // no life gain - assertEquals(20, simGame2.getPlayers().get(0).getLife()); - assertEquals(17, simGame2.getPlayers().get(1).getLife()); - } - - public void testTransform() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Swamp", p); - addCard("Swamp", p); - addCard("Swamp", p); - String lilianaCardName = "Liliana, Heretical Healer"; - String lilianaPWName = "Liliana, Defiant Necromancer"; - Card lilianaInPlay = addCard(lilianaCardName, p); - Card lilianaInHand = addCardToZone(lilianaCardName, p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertTrue(lilianaInPlay.isCreature()); - assertEquals(2, lilianaInPlay.getNetPower()); - assertEquals(3, lilianaInPlay.getNetToughness()); - - SpellAbility playLiliana = lilianaInHand.getSpellAbilities().get(0); - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(playLiliana); - Game simGame = sim.getSimulatedGameState(); - assertNull(findCardWithName(simGame, lilianaCardName)); - Card lilianaPW = findCardWithName(simGame, lilianaPWName); - assertNotNull(lilianaPW); - assertTrue(lilianaPW.isPlaneswalker()); - assertEquals(3, lilianaPW.getCurrentLoyalty()); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Card lilianaPWCopy = findCardWithName(copy, lilianaPWName); - assertNotNull(lilianaPWCopy); - assertTrue(lilianaPWCopy.isPlaneswalker()); - assertEquals(3, lilianaPWCopy.getCurrentLoyalty()); - } - - public void testEnergy() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Island", p); - String turtleCardName = "Thriving Turtle"; - Card turtleCard = addCardToZone(turtleCardName, p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - assertEquals(0, p.getCounters(CounterType.ENERGY)); - - SpellAbility playTurtle = turtleCard.getSpellAbilities().get(0); - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(playTurtle); - Game simGame = sim.getSimulatedGameState(); - Player simP = simGame.getPlayers().get(1); - assertEquals(2, simP.getCounters(CounterType.ENERGY)); - - GameCopier copier = new GameCopier(simGame); - Game copy = copier.makeCopy(); - Player copyP = copy.getPlayers().get(1); - assertEquals(2, copyP.getCounters(CounterType.ENERGY)); - } - - public void testFloatingMana() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - addCard("Swamp", p); - Card darkRitualCard = addCardToZone("Dark Ritual", p, ZoneType.Hand); - Card darkConfidantCard = addCardToZone("Dark Confidant", p, ZoneType.Hand); - Card deathriteCard = addCardToZone("Deathrite Shaman", p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - assertTrue(p.getManaPool().isEmpty()); - - SpellAbility playRitual = darkRitualCard.getSpellAbilities().get(0); - GameSimulator sim = createSimulator(game, p); - sim.simulateSpellAbility(playRitual); - Game simGame = sim.getSimulatedGameState(); - Player simP = simGame.getPlayers().get(1); - assertEquals(3, simP.getManaPool().totalMana()); - assertEquals(3, simP.getManaPool().getAmountOfColor(MagicColor.BLACK)); - - Card darkConfidantCard2 = (Card) sim.getGameCopier().find(darkConfidantCard); - SpellAbility playDarkConfidant2 = darkConfidantCard2.getSpellAbilities().get(0); - Card deathriteCard2 = (Card) sim.getGameCopier().find(deathriteCard); - - GameSimulator sim2 = createSimulator(simGame, simP); - sim2.simulateSpellAbility(playDarkConfidant2); - Game sim2Game = sim2.getSimulatedGameState(); - Player sim2P = sim2Game.getPlayers().get(1); - assertEquals(1, sim2P.getManaPool().totalMana()); - assertEquals(1, sim2P.getManaPool().getAmountOfColor(MagicColor.BLACK)); - - Card deathriteCard3 = (Card) sim2.getGameCopier().find(deathriteCard2); - SpellAbility playDeathriteCard3 = deathriteCard3.getSpellAbilities().get(0); - - GameSimulator sim3 = createSimulator(sim2Game, sim2P); - sim3.simulateSpellAbility(playDeathriteCard3); - Game sim3Game = sim3.getSimulatedGameState(); - Player sim3P = sim3Game.getPlayers().get(1); - assertEquals(0, sim3P.getManaPool().totalMana()); - assertEquals(0, sim3P.getManaPool().getAmountOfColor(MagicColor.BLACK)); - } - - public void testEnKor() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - - String soulfireName = "Soulfire Grand Master"; - String pridemateName = "Ajani's Pridemate"; - - String enKorName = "Spirit en-Kor"; - String bearName = "Runeclaw Bear"; - String shockName = "Shock"; - - addCard("Mountain", p); - - addCard(soulfireName, p); - addCard(pridemateName, p); - - Card shockCard = addCardToZone(shockName, p, ZoneType.Hand); - - Card enKor = addCard(enKorName, p); - - SpellAbility enKorSA = findSAWithPrefix(enKor, "{0}:"); - - Card bear = addCard(bearName, p); - - SpellAbility shockSA = shockCard.getFirstSpellAbility(); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertEquals(2, enKor.getNetPower()); - assertEquals(2, enKor.getNetToughness()); - assertEquals(0, enKor.getDamage()); - - assertEquals(2, bear.getNetPower()); - assertEquals(2, bear.getNetToughness()); - assertEquals(0, bear.getDamage()); - - GameSimulator sim = createSimulator(game, p); - enKorSA.setTargetCard(bear); - shockSA.setTargetCard(enKor); - sim.simulateSpellAbility(enKorSA); - sim.simulateSpellAbility(shockSA); - Game simGame = sim.getSimulatedGameState(); - Card simEnKor = findCardWithName(simGame, enKorName); - Card simBear = findCardWithName(simGame, bearName); - - assertNotNull(simEnKor); - assertEquals(1, simEnKor.getDamage()); - - assertNotNull(simBear); - assertEquals(1, simBear.getDamage()); - - Card simPridemate = findCardWithName(simGame, pridemateName); - - // only triggered once - assertTrue(simPridemate.hasCounters()); - assertEquals(1, simPridemate.getCounters(CounterType.P1P1)); - assertEquals(1, simPridemate.getToughnessBonusFromCounters()); - assertEquals(1, simPridemate.getPowerBonusFromCounters()); - - assertEquals(22, simGame.getPlayers().get(0).getLife()); - } - - public void testRazia() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - - String soulfireName = "Soulfire Grand Master"; - String pridemateName = "Ajani's Pridemate"; - - String raziaName = "Razia, Boros Archangel"; - String bearName = "Runeclaw Bear"; - String greetingName = "Alchemist's Greeting"; - - for (int i = 0; i < 5; ++i) { - addCard("Mountain", p); - } - - addCard(soulfireName, p); - addCard(pridemateName, p); - - Card greetingCard = addCardToZone(greetingName, p, ZoneType.Hand); - - Card razia = addCard(raziaName, p); - - SpellAbility preventSA = findSAWithPrefix(razia, "{T}:"); - - Card bear = addCard(bearName, p); - - SpellAbility greetingSA = greetingCard.getFirstSpellAbility(); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertEquals(0, razia.getDamage()); - - assertEquals(2, bear.getNetPower()); - assertEquals(2, bear.getNetToughness()); - assertEquals(0, bear.getDamage()); - - GameSimulator sim = createSimulator(game, p); - preventSA.setTargetCard(razia); - preventSA.getSubAbility().setTargetCard(bear); - greetingSA.setTargetCard(razia); - sim.simulateSpellAbility(preventSA); - sim.simulateSpellAbility(greetingSA); - Game simGame = sim.getSimulatedGameState(); - Card simRazia = findCardWithName(simGame, raziaName); - Card simBear = findCardWithName(simGame, bearName); - - assertNotNull(simRazia); - assertEquals(1, simRazia.getDamage()); - - // bear destroyed - assertNull(simBear); - - Card simPridemate = findCardWithName(simGame, pridemateName); - - // only triggered once - assertTrue(simPridemate.hasCounters()); - assertEquals(1, simPridemate.getCounters(CounterType.P1P1)); - assertEquals(1, simPridemate.getToughnessBonusFromCounters()); - assertEquals(1, simPridemate.getPowerBonusFromCounters()); - - assertEquals(24, simGame.getPlayers().get(0).getLife()); - } - - public void testRazia2() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - - String soulfireName = "Soulfire Grand Master"; - String pridemateName = "Ajani's Pridemate"; - - String raziaName = "Razia, Boros Archangel"; - String elementalName = "Air Elemental"; - String shockName = "Shock"; - - for (int i = 0; i < 2; ++i) { - addCard("Mountain", p); - } - - addCard(soulfireName, p); - addCard(pridemateName, p); - - Card shockCard1 = addCardToZone(shockName, p, ZoneType.Hand); - Card shockCard2 = addCardToZone(shockName, p, ZoneType.Hand); - - Card razia = addCard(raziaName, p); - - SpellAbility preventSA = findSAWithPrefix(razia, "{T}:"); - - Card elemental = addCard(elementalName, p); - - SpellAbility shockSA1 = shockCard1.getFirstSpellAbility(); - SpellAbility shockSA2 = shockCard2.getFirstSpellAbility(); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertEquals(0, razia.getDamage()); - - assertEquals(4, elemental.getNetPower()); - assertEquals(4, elemental.getNetToughness()); - assertEquals(0, elemental.getDamage()); - - GameSimulator sim = createSimulator(game, p); - preventSA.setTargetCard(razia); - preventSA.getSubAbility().setTargetCard(elemental); - shockSA1.setTargetCard(razia); - shockSA2.setTargetCard(razia); - sim.simulateSpellAbility(preventSA); - sim.simulateSpellAbility(shockSA1); - sim.simulateSpellAbility(shockSA2); - Game simGame = sim.getSimulatedGameState(); - Card simRazia = findCardWithName(simGame, raziaName); - Card simElemental = findCardWithName(simGame, elementalName); - - assertNotNull(simRazia); - assertEquals(1, simRazia.getDamage()); - - // elemental not destroyed - assertNotNull(simElemental); - assertEquals(3, simElemental.getDamage()); - - Card simPridemate = findCardWithName(simGame, pridemateName); - - // only triggered twice - assertTrue(simPridemate.hasCounters()); - assertEquals(2, simPridemate.getCounters(CounterType.P1P1)); - assertEquals(2, simPridemate.getToughnessBonusFromCounters()); - assertEquals(2, simPridemate.getPowerBonusFromCounters()); - - assertEquals(24, simGame.getPlayers().get(0).getLife()); - } - - public void testMassRemovalVsKalitas() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - Player opp = game.getPlayers().get(1); - - addCardToZone("Kalitas, Traitor of Ghet", p, ZoneType.Battlefield); - for (int i = 0; i < 4; i++) { - addCardToZone("Plains", p, ZoneType.Battlefield); - } - - for (int i = 0; i < 2; i++) { - addCardToZone("Aboroth", opp, ZoneType.Battlefield); - } - - Card wrathOfGod = addCardToZone("Wrath of God", p, ZoneType.Hand); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - - SpellAbility wrathSA = wrathOfGod.getFirstSpellAbility(); - assertNotNull(wrathSA); - - GameSimulator sim = createSimulator(game, p); - int score = sim.simulateSpellAbility(wrathSA).value; - assertTrue(score > 0); - Game simGame = sim.getSimulatedGameState(); - - int numZombies = countCardsWithName(simGame, "Zombie"); - assertTrue(numZombies == 2); - } - - public void testKalitasNumberOfTokens() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - Player opp = game.getPlayers().get(1); - - addCardToZone("Kalitas, Traitor of Ghet", p, ZoneType.Battlefield); - addCardToZone("Anointed Procession", p, ZoneType.Battlefield); - addCardToZone("Swamp", p, ZoneType.Battlefield); - for (int i = 0; i < 4; i++) { - addCardToZone("Mountain", p, ZoneType.Battlefield); - } - - Card goblin = addCardToZone("Raging Goblin", opp, ZoneType.Battlefield); - Card goblin2 = addCardToZone("Raging Goblin", opp, ZoneType.Battlefield); - - // Fatal Push: should generate 2 tokens - Card fatalPush = addCardToZone("Fatal Push", p, ZoneType.Hand); - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - SpellAbility fatalPushSA = fatalPush.getFirstSpellAbility(); - assertNotNull(fatalPushSA); - fatalPushSA.setTargetCard(goblin); - - // Electrify: should only generate 1 token - Card electrify = addCardToZone("Electrify", p, ZoneType.Hand); - SpellAbility electrifySA = electrify.getFirstSpellAbility(); - assertNotNull(electrifySA); - electrifySA.setTargetCard(goblin2); - - GameSimulator sim = createSimulator(game, p); - int score = sim.simulateSpellAbility(fatalPushSA).value; - assertTrue(score > 0); - assertTrue(countCardsWithName(sim.getSimulatedGameState(), "Zombie") == 2); - - score = sim.simulateSpellAbility(electrifySA).value; - assertTrue(score > 0); - assertTrue(countCardsWithName(sim.getSimulatedGameState(), "Zombie") == 3); - } - - public void testPlayerXCount() { - // If playerXCount is operational, then conditions that count something about the player (e.g. - // cards in hand, life total) should work, similar to the Bloodghast "Haste" condition. - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - Player opp = game.getPlayers().get(1); - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - - Card bloodghast = addCardToZone("Bloodghast", p, ZoneType.Battlefield); - game.getAction().checkStateEffects(true); - - assert(!bloodghast.hasKeyword("Haste")); - - opp.setLife(5, null); - game.getAction().checkStateEffects(true); - - assert(bloodghast.hasKeyword("Haste")); - } - - public void testDeathsShadow() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(0); - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - - addCardToZone("Platinum Angel", p, ZoneType.Battlefield); - Card deathsShadow = addCardToZone("Death's Shadow", p, ZoneType.Battlefield); - - p.setLife(1, null); - game.getAction().checkStateEffects(true); - assert(deathsShadow.getNetPower() == 12); - - p.setLife(-1, null); - game.getAction().checkStateEffects(true); - assert(deathsShadow.getNetPower() == 13); // on negative life, should always be 13/13 - } -} diff --git a/forge-gui-desktop/src/test/java/forge/ai/simulation/SimulationTestCase.java b/forge-gui-desktop/src/test/java/forge/ai/simulation/SimulationTestCase.java deleted file mode 100644 index e3aee9cb..00000000 --- a/forge-gui-desktop/src/test/java/forge/ai/simulation/SimulationTestCase.java +++ /dev/null @@ -1,136 +0,0 @@ -package forge.ai.simulation; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import com.google.common.base.Function; -import com.google.common.collect.Lists; - -import forge.GuiBase; -import forge.GuiDesktop; -import forge.StaticData; -import forge.ai.AIOption; -import forge.ai.LobbyPlayerAi; -import forge.ai.simulation.GameStateEvaluator.Score; -import forge.deck.Deck; -import forge.game.Game; -import forge.game.GameRules; -import forge.game.GameStage; -import forge.game.GameType; -import forge.game.Match; -import forge.game.card.Card; -import forge.game.card.CardCollectionView; -import forge.game.player.Player; -import forge.game.player.RegisteredPlayer; -import forge.game.spellability.SpellAbility; -import forge.game.zone.ZoneType; -import forge.item.IPaperCard; -import forge.model.FModel; -import forge.properties.ForgePreferences; -import forge.properties.ForgePreferences.FPref; -import junit.framework.TestCase; - -public class SimulationTestCase extends TestCase { - private static boolean initialized = false; - - protected Game initAndCreateGame() { - List players = Lists.newArrayList(); - Deck d1 = new Deck(); - players.add(new RegisteredPlayer(d1).setPlayer(new LobbyPlayerAi("p2", null))); - Set options = new HashSet<>(); - options.add(AIOption.USE_SIMULATION); - players.add(new RegisteredPlayer(d1).setPlayer(new LobbyPlayerAi("p1", options))); - GameRules rules = new GameRules(GameType.Constructed); - Match match = new Match(rules, players, "Test"); - Game game = new Game(players, rules, match); - game.setAge(GameStage.Play); - - if (!initialized) { - GuiBase.setInterface(new GuiDesktop()); - FModel.initialize(null, new Function() { - @Override - public Void apply(ForgePreferences preferences) { - preferences.setPref(FPref.LOAD_CARD_SCRIPTS_LAZILY, false); - return null; - } - }); - initialized = true; - } - return game; - } - - protected GameSimulator createSimulator(Game game, Player p) { - return new GameSimulator(new SimulationController(new Score(0)) { - @Override - public boolean shouldRecurse() { - return false; - } - }, game, p, null); - } - - protected int countCardsWithName(Game game, String name) { - int i = 0; - for (Card c : game.getCardsIn(ZoneType.Battlefield)) { - if (c.getName().equals(name)) { - i++; - } - } - return i; - } - - protected Card findCardWithName(Game game, String name) { - for (Card c : game.getCardsIn(ZoneType.Battlefield)) { - if (c.getName().equals(name)) { - return c; - } - } - return null; - } - - protected String gameStateToString(Game game) { - StringBuilder sb = new StringBuilder(); - for (ZoneType zone : ZoneType.values()) { - CardCollectionView cards = game.getCardsIn(zone); - if (!cards.isEmpty()) { - sb.append("Zone ").append(zone.name()).append(":\n"); - for (Card c : game.getCardsIn(zone)) { - sb.append(" ").append(c).append("\n"); - } - } - } - return sb.toString(); - } - - protected SpellAbility findSAWithPrefix(Card c, String prefix) { - return findSAWithPrefix(c.getSpellAbilities(), prefix); - } - - protected SpellAbility findSAWithPrefix(Iterable abilities, String prefix) { - for (SpellAbility sa : abilities) { - if (sa.getDescription().startsWith(prefix)) { - return sa; - } - } - return null; - } - - protected Card createCard(String name, Player p) { - IPaperCard paperCard = FModel.getMagicDb().getCommonCards().getCard(name); - if (paperCard == null) { - StaticData.instance().attemptToLoadCard(name, ""); - paperCard = FModel.getMagicDb().getCommonCards().getCard(name); - } - return Card.fromPaperCard(paperCard, p); - } - - protected Card addCardToZone(String name, Player p, ZoneType zone) { - Card c = createCard(name, p); - p.getZone(zone).add(c); - return c; - } - - protected Card addCard(String name, Player p) { - return addCardToZone(name, p, ZoneType.Battlefield); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerTest.java b/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerTest.java deleted file mode 100644 index 3683b33c..00000000 --- a/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerTest.java +++ /dev/null @@ -1,388 +0,0 @@ -package forge.ai.simulation; - -import java.util.List; - -import forge.game.Game; -import forge.game.card.Card; -import forge.game.card.CounterType; -import forge.game.combat.Combat; -import forge.game.phase.PhaseType; -import forge.game.player.Player; -import forge.game.spellability.SpellAbility; -import forge.game.zone.ZoneType; - -public class SpellAbilityPickerTest extends SimulationTestCase { - public void testPickingLethalDamage() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCardToZone("Shock", p, ZoneType.Hand); - - Player opponent = game.getPlayers().get(0); - addCard("Runeclaw Bear", opponent); - opponent.setLife(2, null); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertNotNull(sa); - assertNull(sa.getTargetCard()); - assertEquals(opponent, sa.getTargets().getFirstTargetedPlayer()); - } - - public void testPickingKillingCreature() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCardToZone("Shock", p, ZoneType.Hand); - - Player opponent = game.getPlayers().get(0); - Card bearCard = addCard("Runeclaw Bear", opponent); - opponent.setLife(20, null); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertNotNull(sa); - assertEquals(bearCard, sa.getTargetCard()); - assertNull(sa.getTargets().getFirstTargetedPlayer()); - } - - public void testSequenceStartingWithPlayingLand() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - Card mountain = addCardToZone("Mountain", p, ZoneType.Hand); - addCardToZone("Shock", p, ZoneType.Hand); - - Player opponent = game.getPlayers().get(0); - addCard("Runeclaw Bear", opponent); - opponent.setLife(20, null); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(game.PLAY_LAND_SURROGATE, sa); - assertEquals(mountain, sa.getHostCard()); - - Plan plan = picker.getPlan(); - assertEquals(2, plan.getDecisions().size()); - assertEquals("Play land Mountain", plan.getDecisions().get(0).saRef.toString()); - assertEquals("Shock deals 2 damage to target creature or player.", plan.getDecisions().get(1).saRef.toString()); - assertTrue(plan.getDecisions().get(1).targets.toString().contains("Runeclaw Bear")); - } - - public void testModeSelection() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Plains", p); - addCard("Island", p); - addCard("Swamp", p); - Card spell = addCardToZone("Dromar's Charm", p, ZoneType.Hand); - - Player opponent = game.getPlayers().get(0); - addCard("Runeclaw Bear", opponent); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - // Expected: All creatures get -2/-2 to kill the bear. - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(spell.getSpellAbilities().get(0), sa); - assertEquals("Dromar's Charm -> Target creature gets -2/-2 until end of turn.", picker.getPlan().getDecisions().get(0).modesStr); - } - - public void testModeSelection2() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Plains", p); - addCard("Island", p); - addCard("Swamp", p); - Card spell = addCardToZone("Dromar's Charm", p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - // Expected: Gain 5 life, since other modes aren't helpful. - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(spell.getSpellAbilities().get(0), sa); - assertEquals("Dromar's Charm -> You gain 5 life.", picker.getPlan().getDecisions().get(0).modesStr); - } - - public void testMultipleModes() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCard("Mountain", p); - addCard("Mountain", p); - addCard("Mountain", p); - Card spell = addCardToZone("Fiery Confluence", p, ZoneType.Hand); - - Player opponent = game.getPlayers().get(0); - addCard("Runeclaw Bear", opponent); - opponent.setLife(20, null); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - // Expected: 2x 1 damage to each creature, 1x 2 damage to each opponent. - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(spell.getSpellAbilities().get(0), sa); - - String dmgCreaturesStr = "Fiery Confluence deals 1 damage to each creature."; - String dmgOppStr = "Fiery Confluence deals 2 damage to each opponent."; - String expected = "Fiery Confluence -> " + dmgCreaturesStr + " " + dmgCreaturesStr + " " + dmgOppStr; - assertEquals(expected, picker.getPlan().getDecisions().get(0).modesStr); - } - - public void testMultipleModes2() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCard("Mountain", p); - addCard("Mountain", p); - addCard("Mountain", p); - Card spell = addCardToZone("Fiery Confluence", p, ZoneType.Hand); - - Player opponent = game.getPlayers().get(0); - addCard("Runeclaw Bear", opponent); - opponent.setLife(6, null); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - // Expected: 3x 2 damage to each opponent. - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(spell.getSpellAbilities().get(0), sa); - - String dmgOppStr = "Fiery Confluence deals 2 damage to each opponent."; - String expected = "Fiery Confluence -> " + dmgOppStr + " " + dmgOppStr + " " + dmgOppStr; - assertEquals(expected, picker.getPlan().getDecisions().get(0).modesStr); - } - - public void testMultipleTargets() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCard("Mountain", p); - Card spell = addCardToZone("Arc Trail", p, ZoneType.Hand); - - Player opponent = game.getPlayers().get(0); - Card bear = addCard("Runeclaw Bear", opponent); - Card men = addCard("Flying Men", opponent); - opponent.setLife(20, null); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(spell.getSpellAbilities().get(0), sa); - assertEquals(bear, sa.getTargetCard()); - assertEquals("2", sa.getParam("NumDmg")); - SpellAbility subSa = sa.getSubAbility(); - assertEquals(men, subSa.getTargetCard()); - assertEquals("1", subSa.getParam("NumDmg")); - } - - public void testLandSearchForCombo() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Forest", p); - addCard("Thespian's Stage", p); - Card darkDepths = addCard("Dark Depths", p); - - Card cropRotation = addCardToZone("Crop Rotation", p, ZoneType.Hand); - - addCardToZone("Forest", p, ZoneType.Library); - addCardToZone("Urborg, Tomb of Yawgmoth", p, ZoneType.Library); - addCardToZone("Swamp", p, ZoneType.Library); - - darkDepths.setCounters(CounterType.ICE, 10); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - assertEquals(10, darkDepths.getCounters(CounterType.ICE)); - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(cropRotation.getSpellAbilities().get(0), sa); - // Expected: Sac a Forest to get an Urborg. - List choices = picker.getPlan().getDecisions().get(0).choices; - assertEquals(2, choices.size()); - assertEquals("Forest", choices.get(0)); - assertEquals("Urborg, Tomb of Yawgmoth", choices.get(1)); - // Next, expected to use Thespian's Stage to copy Dark Depths. - Plan.Decision d2 = picker.getPlan().getDecisions().get(1); - String expected = "{2}, {T}: Thespian's Stage becomes a copy of target land and gains this ability."; - assertEquals(expected, d2.saRef.toString()); - assertTrue(d2.targets.toString().contains("Dark Depths")); - } - - public void testPlayRememberedCardsLand() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCard("Mountain", p); - Card abbot = addCardToZone("Abbot of Keral Keep", p, ZoneType.Hand); - addCardToZone("Lightning Bolt", p, ZoneType.Hand); - // Note: This assumes the top of library is revealed. If the AI is made - // smarter to not assume that, then this test can be updated to have - // something that reveals top of library active - e.g. Lens of Clarity. - addCardToZone("Mountain", p, ZoneType.Library); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - // Expected plan: - // 1. Play Abbot. - // 2. Play land exiled by Abbot. - // 3. Play Bolt targeting opponent. - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(abbot.getSpellAbilities().get(0), sa); - Plan plan = picker.getPlan(); - assertEquals(3, plan.getDecisions().size()); - assertEquals("Play land Mountain", plan.getDecisions().get(1).saRef.toString()); - assertEquals("Lightning Bolt deals 3 damage to target creature or player.", plan.getDecisions().get(2).saRef.toString()); - } - - public void testPlayRememberedCardsSpell() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - - addCard("Mountain", p); - addCard("Mountain", p); - addCard("Mountain", p); - Card abbot = addCardToZone("Abbot of Keral Keep", p, ZoneType.Hand); - // Note: This assumes the top of library is revealed. If the AI is made - // smarter to not assume that, then this test can be updated to have - // something that reveals top of library active - e.g. Lens of Clarity. - addCardToZone("Lightning Bolt", p, ZoneType.Library); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p); - game.getAction().checkStateEffects(true); - - // Expected plan: - // 1. Play Abbot. - // 3. Play Bolt exiled by Abbot. - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertEquals(abbot.getSpellAbilities().get(0), sa); - Plan plan = picker.getPlan(); - assertEquals(2, plan.getDecisions().size()); - String saDesc = plan.getDecisions().get(1).saRef.toString(); - assertTrue(saDesc, saDesc.startsWith("Lightning Bolt deals 3 damage to target creature or player.")); - } - - public void testPlayingPumpSpellsAfterBlocks() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Player opponent = game.getPlayers().get(0); - opponent.setLife(2, null); - - Card blocker = addCard("Fugitive Wizard", opponent); - Card attacker1 = addCard("Dwarven Trader", p); - attacker1.setSickness(false); - Card attacker2 = addCard("Dwarven Trader", p); - attacker2.setSickness(false); - addCard("Mountain", p); - addCardToZone("Brute Force", p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - assertNull(picker.chooseSpellAbilityToPlay(null)); - - game.getPhaseHandler().devModeSet(PhaseType.COMBAT_BEGIN, p); - game.getAction().checkStateEffects(true); - assertNull(picker.chooseSpellAbilityToPlay(null)); - - game.getPhaseHandler().devModeSet(PhaseType.COMBAT_DECLARE_ATTACKERS, p); - Combat combat = new Combat(p); - combat.addAttacker(attacker1, opponent); - combat.addAttacker(attacker2, opponent); - game.getPhaseHandler().setCombat(combat); - game.getAction().checkStateEffects(true); - assertNull(picker.chooseSpellAbilityToPlay(null)); - - game.getPhaseHandler().devModeSet(PhaseType.COMBAT_DECLARE_BLOCKERS, p, false); - game.getAction().checkStateEffects(true); - combat.addBlocker(attacker1, blocker); - combat.getBandOfAttacker(attacker1).setBlocked(true); - combat.getBandOfAttacker(attacker2).setBlocked(false); - combat.orderBlockersForDamageAssignment(); - combat.orderAttackersForDamageAssignment(); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertNotNull(sa); - assertEquals("Target creature gets +3/+3 until end of turn.", sa.toString()); - assertEquals(attacker2, sa.getTargetCard()); - } - - public void testPlayingSorceryPumpSpellsBeforeBlocks() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Player opponent = game.getPlayers().get(0); - opponent.setLife(2, null); - - addCard("Fugitive Wizard", opponent); - Card attacker1 = addCard("Dwarven Trader", p); - attacker1.setSickness(false); - Card attacker2 = addCard("Kird Ape", p); - attacker2.setSickness(false); - addCard("Mountain", p); - Card furor = addCardToZone("Furor of the Bitten", p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertNotNull(sa); - assertEquals(furor.getSpellAbilities().get(0), sa); - assertEquals(attacker1, sa.getTargetCard()); - } - - public void testPlayingRemovalBeforeBlocks() { - Game game = initAndCreateGame(); - Player p = game.getPlayers().get(1); - Player opponent = game.getPlayers().get(0); - opponent.setLife(2, null); - - Card blocker = addCard("Fugitive Wizard", opponent); - Card attacker1 = addCard("Dwarven Trader", p); - attacker1.setSickness(false); - addCard("Swamp", p); - addCard("Swamp", p); - addCardToZone("Doom Blade", p, ZoneType.Hand); - - game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); - game.getAction().checkStateEffects(true); - - SpellAbilityPicker picker = new SpellAbilityPicker(game, p); - SpellAbility sa = picker.chooseSpellAbilityToPlay(null); - assertNotNull(sa); - assertEquals("Destroy target nonblack creature.", sa.toString()); - assertEquals(blocker, sa.getTargetCard()); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/deck/generate/Generate2ColorDeckTest.java b/forge-gui-desktop/src/test/java/forge/deck/generate/Generate2ColorDeckTest.java deleted file mode 100644 index 03afa1a1..00000000 --- a/forge-gui-desktop/src/test/java/forge/deck/generate/Generate2ColorDeckTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package forge.deck.generate; - -import forge.card.CardDb; -import forge.deck.DeckFormat; -import forge.deck.generation.DeckGenerator2Color; -import forge.item.PaperCard; -import forge.model.FModel; -import forge.util.ItemPool; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }, enabled = false) -public class Generate2ColorDeckTest { - - /** - * Generate2 color deck test1. - */ - @Test(enabled = false) - public void generate2ColorDeckTest1() { - CardDb cardDb = FModel.getMagicDb().getCommonCards(); - final DeckGenerator2Color gen = new DeckGenerator2Color(cardDb, DeckFormat.Constructed, "white", "blue"); - final ItemPool cardList = gen.getDeck(60, false); - Assert.assertNotNull(cardList); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/deck/generate/Generate3ColorDeckTest.java b/forge-gui-desktop/src/test/java/forge/deck/generate/Generate3ColorDeckTest.java deleted file mode 100644 index 36e9ccc6..00000000 --- a/forge-gui-desktop/src/test/java/forge/deck/generate/Generate3ColorDeckTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package forge.deck.generate; - -import forge.card.CardDb; -import forge.deck.CardPool; -import forge.deck.DeckFormat; -import forge.deck.generation.DeckGenerator3Color; -import forge.model.FModel; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class Generate3ColorDeckTest { - - /** - * Generate3 color deck test1. - */ - @Test(timeOut = 1000, enabled = false) - public void generate3ColorDeckTest1() { - CardDb cardDb = FModel.getMagicDb().getCommonCards(); - final DeckGenerator3Color gen = new DeckGenerator3Color(cardDb, DeckFormat.Constructed, "white", "blue", "black"); - final CardPool cardList = gen.getDeck(60, false); - Assert.assertNotNull(cardList); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/deck/generate/Generate5ColorDeckTest.java b/forge-gui-desktop/src/test/java/forge/deck/generate/Generate5ColorDeckTest.java deleted file mode 100644 index 37e89fbc..00000000 --- a/forge-gui-desktop/src/test/java/forge/deck/generate/Generate5ColorDeckTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package forge.deck.generate; - -import forge.card.CardDb; -import forge.deck.CardPool; -import forge.deck.DeckFormat; -import forge.deck.generation.DeckGenerator5Color; -import forge.model.FModel; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class Generate5ColorDeckTest { - - /** - * Generate5 color deck test1. - */ - @Test(timeOut = 1000, enabled = false) - public void generate5ColorDeckTest1() { - CardDb cardDb = FModel.getMagicDb().getCommonCards(); - final DeckGenerator5Color gen = new DeckGenerator5Color(cardDb, DeckFormat.Constructed); - final CardPool cardList = gen.getDeck(60, false); - Assert.assertNotNull(cardList); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/BaseGameSimulationTest.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/BaseGameSimulationTest.java deleted file mode 100644 index 12ab8d1e..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/BaseGameSimulationTest.java +++ /dev/null @@ -1,66 +0,0 @@ -package forge.gamesimulationtests; - -import forge.ImageCache; -import forge.Singletons; -import forge.gamesimulationtests.util.CardDatabaseHelper; -import forge.gamesimulationtests.util.GameWrapper; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationHandler; -import forge.gamesimulationtests.util.playeractions.testactions.AssertAction; -import forge.model.FModel; -import forge.properties.ForgePreferences; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.testng.PowerMockTestCase; -import org.testng.Assert; -import org.testng.IObjectFactory; -import org.testng.annotations.ObjectFactory; - -import javax.imageio.ImageIO; - -@PrepareForTest(value = { FModel.class, Singletons.class, ImageCache.class, ImageIO.class }) -public class BaseGameSimulationTest extends PowerMockTestCase { - //Can't run this with @BeforeTest or something like that, because of static voodoo - protected void initializeMocks() throws Exception { - //Loading a card also automatically loads the image, which we do not want (even if it wouldn't cause exceptions). - //The static initializer block in ImageCache can't fully be mocked (https://code.google.com/p/powermock/issues/detail?id=256), so we also need to mess with ImageIO... - //TODO: make sure that loading images only happens in a GUI environment, so we no longer need to mock this - PowerMockito.mockStatic(ImageIO.class); - PowerMockito.mockStatic(ImageCache.class); - - //Mocking some more static stuff - ForgePreferences forgePreferences = new ForgePreferences(); - PowerMockito.when(FModel.getPreferences()).thenReturn(forgePreferences); - PowerMockito.mockStatic(Singletons.class); - PowerMockito.mockStatic(FModel.class); - PowerMockito.when(FModel.getMagicDb()).thenReturn(CardDatabaseHelper.getStaticDataToPopulateOtherMocks()); - } - - @ObjectFactory - public IObjectFactory getObjectFactory() { - return new org.powermock.modules.testng.PowerMockObjectFactory(); - } - - protected void runGame(GameWrapper game, PlayerSpecification expectedWinner, int finalTurn, AssertAction... postGameAssertActions) { - try { - initializeMocks(); - game.runGame(); - verifyThatTheGameHasFinishedAndThatPlayerHasWonOnTurn(game, expectedWinner, finalTurn); - if(postGameAssertActions != null && postGameAssertActions.length > 0) { - for(AssertAction assertAction : postGameAssertActions) { - assertAction.performAssertion(game.getGame()); - } - } - } catch (Throwable t) { - System.out.println(game.toString()); - throw new RuntimeException(t); - } - } - - protected void verifyThatTheGameHasFinishedAndThatPlayerHasWonOnTurn(GameWrapper game, PlayerSpecification expectedWinner, int finalTurn) { - Assert.assertTrue(game.getGame().isGameOver()); - Assert.assertEquals(game.getGame().getOutcome().getLastTurnNumber(), finalTurn); - Assert.assertEquals(game.getGame().getOutcome().getWinningPlayer(), PlayerSpecificationHandler.INSTANCE.find(game.getGame(), expectedWinner)); - Assert.assertTrue(game.getPlayerActions() == null || game.getPlayerActions().isEmpty()); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/comprehensiverules/ComprehensiveRulesSection103.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/comprehensiverules/ComprehensiveRulesSection103.java deleted file mode 100644 index f7e25f40..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/comprehensiverules/ComprehensiveRulesSection103.java +++ /dev/null @@ -1,48 +0,0 @@ -package forge.gamesimulationtests.comprehensiverules; - -import forge.game.phase.PhaseType; -import forge.gamesimulationtests.BaseGameSimulationTest; -import forge.gamesimulationtests.util.GameWrapper; -import forge.gamesimulationtests.util.card.CardSpecificationBuilder; -import forge.gamesimulationtests.util.gamestate.GameStateSpecificationBuilder; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationBuilder; -import forge.gamesimulationtests.util.playeractions.ActionPreCondition; -import forge.gamesimulationtests.util.playeractions.PlayerActions; -import forge.gamesimulationtests.util.playeractions.testactions.CardAssertAction; -import forge.gamesimulationtests.util.playeractions.testactions.EndTestAction; -import forge.gamesimulationtests.util.playeractions.testactions.PlayerAssertAction; -import org.testng.annotations.Test; - -public class ComprehensiveRulesSection103 extends BaseGameSimulationTest { - @Test - public void test_103_3_players_start_at_20_life() { - GameWrapper gameWrapper = new GameWrapper( - null, - new PlayerActions( - new PlayerAssertAction( PlayerSpecificationBuilder.player1().life( 20 ) ), - new PlayerAssertAction( PlayerSpecificationBuilder.player2().life( 20 ) ), - new EndTestAction( PlayerSpecification.PLAYER_1 ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1 ); - } - - @Test - public void test_103_7a_first_player_skips_draw_step_of_first_turn() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addCard( new CardSpecificationBuilder( "Plains" ).owner( PlayerSpecification.PLAYER_1 ).library() ) - .addCard( new CardSpecificationBuilder( "Forest" ).owner( PlayerSpecification.PLAYER_2 ).library() ) - .build(), - new PlayerActions( - new CardAssertAction( new CardSpecificationBuilder( "Plains" ).owner( PlayerSpecification.PLAYER_1 ).library() ) - .when( new ActionPreCondition().turn( 2 ).phase( PhaseType.END_OF_TURN ) ), - new CardAssertAction( new CardSpecificationBuilder( "Plains" ).owner( PlayerSpecification.PLAYER_1 ).hand() ) - .when( new ActionPreCondition().turn( 3 ).phase( PhaseType.MAIN1 ) ), - new EndTestAction( PlayerSpecification.PLAYER_1 ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_2, 3 ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/comprehensiverules/ComprehensiveRulesSection104.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/comprehensiverules/ComprehensiveRulesSection104.java deleted file mode 100644 index 0cfd9c44..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/comprehensiverules/ComprehensiveRulesSection104.java +++ /dev/null @@ -1,196 +0,0 @@ -package forge.gamesimulationtests.comprehensiverules; - -import forge.game.phase.PhaseType; -import forge.gamesimulationtests.BaseGameSimulationTest; -import forge.gamesimulationtests.util.GameWrapper; -import forge.gamesimulationtests.util.card.CardSpecificationBuilder; -import forge.gamesimulationtests.util.gamestate.GameStateSpecificationBuilder; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationBuilder; -import forge.gamesimulationtests.util.playeractions.*; -import forge.gamesimulationtests.util.playeractions.testactions.CardAssertAction; -import forge.gamesimulationtests.util.playeractions.testactions.EndTestAction; -import forge.gamesimulationtests.util.playeractions.testactions.PlayerAssertAction; -import org.testng.annotations.Test; - -public class ComprehensiveRulesSection104 extends BaseGameSimulationTest { - @Test - public void test_104_2a_player_wins_if_all_opponents_left_even_if_he_couldnt_win() { - /*Due to 1's Abyssal Persecutor, he can't win and 2 can't lose (despite the fact that he attempts to draw from an empty deck on turn 2) - 2 concedes during turn 3 (after 1 drew his last card), and 1 wins after all...*/ - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addCard( new CardSpecificationBuilder( "Abyssal Persecutor" ).controller( PlayerSpecification.PLAYER_1 ).battlefield() ) - .addCard( new CardSpecificationBuilder( "Swamp" ).owner( PlayerSpecification.PLAYER_1 ).library() ) - .build(), - new PlayerActions( - new EndTestAction( PlayerSpecification.PLAYER_2 ).when( new ActionPreCondition().turn( 3 ) ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_1, 3 ); - } - - @Test - public void test_104_2b_effect_may_state_that_player_wins() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player2().life( 1 ) ) - .addCard( new CardSpecificationBuilder( "Near-Death Experience" ).controller( PlayerSpecification.PLAYER_2 ).battlefield().build() ) - .build(), - null - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_2, 2 ); - } - - @Test - public void test_104_3b_player_with_zero_life_loses_the_game() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player2().life( 0 ) ) - .build(), - null - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 ); - } - - @Test - public void test_104_3b_player_with_less_than_zero_life_loses_the_game() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player2().life( -1 ) ) - .build(), - null - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 ); - } - - @Test - public void test_104_3b_player_with_less_than_zero_life_loses_the_game_only_when_a_player_receives_priority() { - //The Lightning Helix targeting himself theoretically drops him to -1, but he's back up to 2 before he could lose - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player1().life( 2 ) ) - .addCard( new CardSpecificationBuilder( "Lightning Helix" ).owner( PlayerSpecification.PLAYER_1 ).hand() ) - .build(), - new PlayerActions( - new CastSpellFromHandAction( PlayerSpecification.PLAYER_1, "Lightning Helix" ), - new CardAssertAction( new CardSpecificationBuilder( "Lightning Helix" ).owner( PlayerSpecification.PLAYER_1 ).graveyard() ) - .when( new ActionPreCondition().turn( 1 ).phase( PhaseType.MAIN1 ) ), - new PlayerAssertAction( PlayerSpecificationBuilder.player1().life( 2 ) ), - new EndTestAction( PlayerSpecification.PLAYER_2 ).when( new ActionPreCondition().phase( PhaseType.MAIN2 ) ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 ); - } - - @Test - public void test_104_3b_player_with_less_than_zero_life_loses_the_game_only_when_a_player_receives_priority_variant_with_combat() { - //Player 2 has 2 life, then takes 3 combat damage but also gains 2 life from lifelink - //TODO: is it actually this rule that makes this situation work, or is combat damage handled simultaneously due to another rule? - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player2().life( 2 ) ) - .addCard( new CardSpecificationBuilder( "Hill Giant" ).owner( PlayerSpecification.PLAYER_1 ).battlefield() ) - .addCard( new CardSpecificationBuilder( "Grizzly Bears" ).owner( PlayerSpecification.PLAYER_1 ).battlefield() ) - .addCard( new CardSpecificationBuilder( "Ajani's Sunstriker" ).owner( PlayerSpecification.PLAYER_2 ).battlefield() ) - .build(), - new PlayerActions( - new DeclareAttackersAction( PlayerSpecification.PLAYER_1 ) - .attack( new CardSpecificationBuilder( "Hill Giant" ).build() ) - .attack( new CardSpecificationBuilder( "Grizzly Bears" ).build() ), - new DeclareBlockersAction( PlayerSpecification.PLAYER_2 ) - .block( new CardSpecificationBuilder( "Grizzly Bears" ).build(), new CardSpecificationBuilder( "Ajani's Sunstriker" ).build() ), - new PlayerAssertAction( PlayerSpecificationBuilder.player2().life( 1 ) ) - .when( new ActionPreCondition().turn( 1 ).phase( PhaseType.COMBAT_END ) ), - new EndTestAction( PlayerSpecification.PLAYER_1 ).when( new ActionPreCondition().phase( PhaseType.MAIN2 ) ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1 ); - } - - @Test - public void test_104_3c_player_who_draws_card_with_empty_library_loses() { - GameWrapper gameWrapper = new GameWrapper( null, null ); - runGame( gameWrapper, PlayerSpecification.PLAYER_1, 2 ); - } - - @Test - public void test_104_3c_player_who_draws_more_cards_than_library_contains_draw_as_much_as_possible_and_loses() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addCard( new CardSpecificationBuilder( "Tidings" ).owner( PlayerSpecification.PLAYER_1 ).hand() ) - .addCard( new CardSpecificationBuilder( "Island" ).owner( PlayerSpecification.PLAYER_1 ).library() ) - .addCard( new CardSpecificationBuilder( "Mountain" ).owner( PlayerSpecification.PLAYER_1 ).library() ) - .build(), - new PlayerActions( - new CastSpellFromHandAction( PlayerSpecification.PLAYER_1, "Tidings" ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1, - new CardAssertAction( new CardSpecificationBuilder( "Island" ).owner( PlayerSpecification.PLAYER_1 ).hand() ), - new CardAssertAction( new CardSpecificationBuilder( "Mountain" ).owner( PlayerSpecification.PLAYER_1 ).hand() ) - ); - } - - @Test - public void test_104_3d_player_with_ten_poison_counters_loses() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player2().poison( 10 ) ) - .build(), - null - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 ); - } - - @Test - public void test_104_3d_player_with_more_than_ten_poison_counters_loses() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player2().poison( 11 ) ) - .build(), - null - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_1, 1 ); - } - - @Test - public void test_104_3e_effect_may_state_that_player_loses() { - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addPlayerFact( PlayerSpecificationBuilder.player2().life( 1 ) ) - .addCard( new CardSpecificationBuilder( "Final Fortune" ).controller( PlayerSpecification.PLAYER_1 ).hand() ) - .addCard( new CardSpecificationBuilder( "Mountain" ).controller( PlayerSpecification.PLAYER_1 ).library() ) - .build(), - new PlayerActions( - new CastSpellFromHandAction( PlayerSpecification.PLAYER_1, "Final Fortune" ), - new CardAssertAction( new CardSpecificationBuilder( "Mountain" ).owner( PlayerSpecification.PLAYER_1 ).hand() ) - .when( new ActionPreCondition().turn( 2 ).phase( PhaseType.MAIN2 ) ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_2, 2 ); - } - - @Test( enabled = false )//TODO fails, so disable for now. Note that it seems to really be an issue with Forge and this rule, as commenting out the Laboratory Maniac line below (so there's just a loss, not a win), correctly triggers the loss - public void test_104_3f_if_a_player_would_win_and_lose_simultaneously_he_loses() { - /* http://community.wizards.com/content/forum-topic/3199056 - * Player 1 activates the Trashing Wumpus's ability - * The damage to himself makes Nefarious Lich make him exile a card from his graveyard, which he can't, so it makes him lose - * However at the exact same time, the lifelink makes Nefarious Lich make him draw a card, - * but because his library is empty, this makes the Laboratory Maniac make him win. - * This rule says that the loss should override the win. - */ - GameWrapper gameWrapper = new GameWrapper( - new GameStateSpecificationBuilder() - .addCard( new CardSpecificationBuilder( "Laboratory Maniac" ).controller( PlayerSpecification.PLAYER_1 ).battlefield() ) - .addCard( new CardSpecificationBuilder( "Nefarious Lich" ).controller( PlayerSpecification.PLAYER_1 ).battlefield() ) - .addCard( new CardSpecificationBuilder( "Thrashing Wumpus" ).controller( PlayerSpecification.PLAYER_1 ).battlefield() ) - .addCard( new CardSpecificationBuilder( "Lifelink" ).controller( PlayerSpecification.PLAYER_1 ).battlefield().target( new CardSpecificationBuilder( "Thrashing Wumpus" ).build() ) ) - .build(), - new PlayerActions( - new ActivateAbilityAction( PlayerSpecification.PLAYER_1, new CardSpecificationBuilder( "Thrashing Wumpus" ).build() ) - ) - ); - runGame( gameWrapper, PlayerSpecification.PLAYER_2, 1 ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/CardDatabaseHelper.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/CardDatabaseHelper.java deleted file mode 100644 index c99c98ac..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/CardDatabaseHelper.java +++ /dev/null @@ -1,43 +0,0 @@ -package forge.gamesimulationtests.util; - -import forge.CardStorageReader; -import forge.StaticData; -import forge.item.PaperCard; -import forge.model.FModel; -import forge.properties.ForgeConstants; -import forge.properties.ForgePreferences.FPref; - -public class CardDatabaseHelper { - private static StaticData staticData; - - public static PaperCard getCard(String name) { - initializeIfNeeded(); - - PaperCard result = staticData.getCommonCards().getCard(name); - if (result == null) { - throw new IllegalArgumentException("Failed to get card with name " + name); - } - return result; - } - - private static void initializeIfNeeded() { - if (hasBeenInitialized()) { - return; - } - initialize(); - } - - private static void initialize() { - final CardStorageReader reader = new CardStorageReader(ForgeConstants.CARD_DATA_DIR, null, FModel.getPreferences().getPrefBoolean(FPref.LOAD_CARD_SCRIPTS_LAZILY)); - staticData = new StaticData(reader, ForgeConstants.EDITIONS_DIR, ForgeConstants.BLOCK_DATA_DIR); - } - - private static boolean hasBeenInitialized() { - return staticData != null; - } - - public static StaticData getStaticDataToPopulateOtherMocks() { - initializeIfNeeded(); - return staticData; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/GameWrapper.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/GameWrapper.java deleted file mode 100644 index 83eeef5e..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/GameWrapper.java +++ /dev/null @@ -1,174 +0,0 @@ -package forge.gamesimulationtests.util; - -import forge.deck.Deck; -import forge.game.*; -import forge.game.card.Card; -import forge.game.event.GameEventGameFinished; -import forge.game.player.Player; -import forge.game.player.RegisteredPlayer; -import forge.game.trigger.Trigger; -import forge.game.trigger.TriggerHandler; -import forge.game.trigger.TriggerType; -import forge.game.zone.ZoneType; -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.card.CardSpecificationHandler; -import forge.gamesimulationtests.util.gamestate.GameStateSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationBuilder; -import forge.gamesimulationtests.util.player.PlayerSpecificationHandler; -import forge.gamesimulationtests.util.playeractions.PlayerActions; -import forge.item.PaperCard; -import forge.model.FModel; -import forge.properties.ForgePreferences.FPref; - -import java.util.*; - -public class GameWrapper { - private final List players; - private final GameStateSpecification initialGameStateSpecification; - private final PlayerActions playerActions; - private final GameLog gameLog; - private Game game; - - public GameWrapper( GameStateSpecification initialGameStateSpecification, PlayerActions playerActions ) { - this( initialGameStateSpecification, playerActions, Arrays.asList( PlayerSpecification.PLAYER_1, PlayerSpecification.PLAYER_2 ) ); - } - - public GameWrapper( GameStateSpecification initialGameStateSpecification, PlayerActions playerActions, List players ) { - this.initialGameStateSpecification = initialGameStateSpecification; - this.playerActions = playerActions; - this.players = players; - - gameLog = new GameLog(); - } - - /** - * This start method attempts to start from the specified game state. - * That requires a bit of ugly hackery, possibly breaking after harmless refactorings or improvements to real code, - * and always casting doubt upon the veracity of test results. - * To somewhat minimize those concerns, starting with stuff on the stack and/or combat in progress is pretty much out of the question. - * Note that if you use this option, regular startup is ignored (using player deck, shuffling, drawing hand, mulligan, ...) - */ - public void runGame() { - List registeredPlayers = new ArrayList(); - for( PlayerSpecification player : players ) { - RegisteredPlayer registeredPlayer = new RegisteredPlayer(new Deck(player.getName())); - LobbyPlayerForTests lobbyPlayer = new LobbyPlayerForTests( player.getName(), playerActions ); - registeredPlayer.setPlayer( lobbyPlayer ); - registeredPlayers.add( registeredPlayer ); - } - - GameRules rules = new GameRules(GameType.Constructed); - rules.setPlayForAnte(FModel.getPreferences().getPrefBoolean(FPref.UI_ANTE)); - rules.setMatchAnteRarity(FModel.getPreferences().getPrefBoolean(FPref.UI_ANTE_MATCH_RARITY)); - rules.setManaBurn(FModel.getPreferences().getPrefBoolean(FPref.UI_MANABURN)); - Match match = new Match(rules, registeredPlayers, "Test"); - game = match.createGame(); - - //GameNew.newGame( game, false, false ) does a bit of internal setup, then prepares libraries etc - Trigger.resetIDs(); - TriggerHandler trigHandler = game.getTriggerHandler(); - trigHandler.clearDelayedTrigger(); - - //instead of preparing libraries the normal way, we'll distribute cards across the specified zones - if( initialGameStateSpecification != null && !initialGameStateSpecification.getCards().isEmpty() ) { - for( CardSpecification card : initialGameStateSpecification.getCards() ) { - PaperCard paperCard = CardDatabaseHelper.getCard( card.getName() ); - - PlayerSpecification owner = card.getOwner(); - PlayerSpecification controller = card.getController(); - if( owner == null ) { - owner = controller; - } - if( controller == null ) { - controller = owner; - } - - if( owner == null ) { - throw new IllegalStateException( "Cards must specify owner for game state specification" ); - } - Player actualOwner = PlayerSpecificationHandler.INSTANCE.find( game, owner ); - if( controller == null ) { - throw new IllegalStateException( "Cards must specify controller for game state specification" ); - } - Player actualController = PlayerSpecificationHandler.INSTANCE.find( game, controller ); - - ZoneType zoneType = card.getZoneType(); - if( zoneType == null ) { - throw new IllegalStateException( "Cards must specify zone for game state specification" ); - } - - Card actualCard = Card.fromPaperCard( paperCard, actualOwner ); - actualController.getZone( zoneType ).add( actualCard ); - - if( card.getTarget() != null ) { - Card target = CardSpecificationHandler.INSTANCE.find( game, card.getTarget() ); - if( actualCard.isEnchantment() ) { - if( target.canBeEnchantedBy( actualCard ) ) { - actualCard.enchantEntity( target ); - } else { - throw new IllegalStateException( actualCard + " can't enchant " + target ); - } - } else if( actualCard.isEquipment() ) { - if( target.canBeEquippedBy( actualCard ) ) { - actualCard.equipCard( target ); - } else { - throw new IllegalStateException( actualCard + " can't equip " + target ); - } - } else { - throw new IllegalStateException( "Don't know how to make " + actualCard + " target anything" ); - } - } - - - } - } - - //may need to tweak players a bit too - if( initialGameStateSpecification != null && !initialGameStateSpecification.getPlayerFacts().isEmpty() ) { - for( final PlayerSpecification playerFact : initialGameStateSpecification.getPlayerFacts() ) { - final PlayerSpecification basePlayerSpec = new PlayerSpecificationBuilder( playerFact.getName() ).build(); - Player player = PlayerSpecificationHandler.INSTANCE.find( game, basePlayerSpec ); - - if( playerFact.getLife() != null ) { - player.setLife( playerFact.getLife(), null ); - } - - if( playerFact.getPoison() != null ) { - player.setPoisonCounters( playerFact.getPoison(), null ); - } - } - } - - //game.getAction().startGame( null ) determines starting player, draws starting hands, handles mulligans, and initiates the first turn - //skip drawing initial hand and mulliganing - game.setAge( GameStage.Play ); - final HashMap runParams = new HashMap(); - game.getTriggerHandler().runTrigger( TriggerType.NewGame, runParams, false ); - //first player in the list starts, no coin toss etc - game.getPhaseHandler().startFirstTurn( game.getPlayers().get( 0 ) ); - game.fireEvent( new GameEventGameFinished() ); - } - - public PlayerActions getPlayerActions() { - return playerActions; - } - - public Game getGame() { - return game; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - - sb.append( "Game log : \r\n" ); - List gameLogEntries = gameLog.getLogEntries( GameLogEntryType.PHASE ); - Collections.reverse( gameLogEntries ); - for( GameLogEntry gameLogEntry : gameLogEntries ) { - sb.append( gameLogEntry.toString() ).append( "\r\n" ); - } - - return sb.toString(); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/IntegerConstraint.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/IntegerConstraint.java deleted file mode 100644 index 6fb0191c..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/IntegerConstraint.java +++ /dev/null @@ -1,31 +0,0 @@ -package forge.gamesimulationtests.util; - -public class IntegerConstraint { - public static final IntegerConstraint ONE = new IntegerConstraint( 1 ); - public static final IntegerConstraint ZERO_OR_MORE = new IntegerConstraint( 0, Integer.MAX_VALUE ); - public static final IntegerConstraint ZERO_OR_ONE = new IntegerConstraint( 0, 1 ); - - private final int min; - private final int max; - - public IntegerConstraint( int value ) { - this( value, value ); - } - - public IntegerConstraint( int min, int max ) { - this.min = min; - this.max = max; - } - - public boolean matches( int amount ) { - return min <= amount && amount <= max; - } - - @Override - public String toString() { - if( min == max ) { - return String.valueOf( min ); - } - return "between " + min + " and " + max; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/LobbyPlayerForTests.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/LobbyPlayerForTests.java deleted file mode 100644 index 464b047c..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/LobbyPlayerForTests.java +++ /dev/null @@ -1,61 +0,0 @@ -package forge.gamesimulationtests.util; - -import forge.LobbyPlayer; -import forge.game.Game; -import forge.game.player.IGameEntitiesFactory; -import forge.game.player.Player; -import forge.game.player.PlayerController; -import forge.gamesimulationtests.util.playeractions.PlayerActions; - -import org.apache.commons.lang3.StringUtils; - -import java.util.HashMap; -import java.util.Map; - -/** - * Default harmless implementation for tests. - * Test-specific behaviour can easily be added by mocking (parts of) this class. - */ -public class LobbyPlayerForTests extends LobbyPlayer implements IGameEntitiesFactory { - private final Map playerControllers; - private final PlayerActions playerActions; - - public LobbyPlayerForTests(String name, PlayerActions playerActions) { - super(name); - playerControllers = new HashMap(); - this.playerActions = playerActions; - } - - private PlayerController createControllerFor(Player player) { - if (!playerControllers.containsKey(player)) { - PlayerControllerForTests dummyPlayerControllerForTests = new PlayerControllerForTests(player.getGame(), player, this); - dummyPlayerControllerForTests.setPlayerActions(playerActions); - playerControllers.put(player, dummyPlayerControllerForTests); - } - return playerControllers.get(player); - } - - @Override - public Player createIngamePlayer(Game gameState, final int id) { - Player dummyPlayer = new Player(getName(), gameState, id); - dummyPlayer.setFirstController(createControllerFor(dummyPlayer)); - return dummyPlayer; - } - - @Override - public PlayerController createMindSlaveController(Player master, Player slave) { - return createControllerFor(slave); - } - - @Override - public void hear(LobbyPlayer player, String message) { - //Do nothing - } - - public PlayerControllerForTests getPlayerController() { - if (playerControllers.size() == 1) { - return playerControllers.values().iterator().next(); - } - throw new IllegalStateException("Can't determine correct controller " + StringUtils.join(playerControllers.entrySet(), ", ")); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/PlayerControllerForTests.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/PlayerControllerForTests.java deleted file mode 100644 index 57b8913c..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/PlayerControllerForTests.java +++ /dev/null @@ -1,667 +0,0 @@ -package forge.gamesimulationtests.util; - -import com.google.common.base.Predicate; -import com.google.common.collect.Iterables; -import com.google.common.collect.ListMultimap; -import com.google.common.collect.Multimap; -import forge.LobbyPlayer; -import forge.ai.ComputerUtil; -import forge.ai.ComputerUtilMana; -import forge.ai.SpellAbilityAi; -import forge.ai.SpellApiToAi; -import forge.ai.ability.ChangeZoneAi; -import forge.ai.ability.DrawAi; -import forge.ai.ability.GameWinAi; -import forge.card.ColorSet; -import forge.card.ICardFace; -import forge.card.MagicColor; -import forge.card.mana.ManaCost; -import forge.card.mana.ManaCostShard; -import forge.deck.Deck; -import forge.game.Game; -import forge.game.GameEntity; -import forge.game.GameObject; -import forge.game.GameType; -import forge.game.ability.AbilityUtils; -import forge.game.card.*; -import forge.game.combat.Combat; -import forge.game.combat.CombatUtil; -import forge.game.cost.Cost; -import forge.game.cost.CostPart; -import forge.game.cost.CostPartMana; -import forge.game.mana.Mana; -import forge.game.mana.ManaCostBeingPaid; -import forge.game.player.*; -import forge.game.replacement.ReplacementEffect; -import forge.game.spellability.*; -import forge.game.trigger.WrappedAbility; -import forge.game.zone.ZoneType; -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.card.CardSpecificationHandler; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationHandler; -import forge.gamesimulationtests.util.playeractions.*; -import forge.item.PaperCard; -import forge.player.HumanPlay; -import forge.util.ITriggerEvent; -import forge.util.MyRandom; -import forge.util.collect.FCollectionView; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.testng.collections.Lists; - -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Default harmless implementation for tests. - * Test-specific behaviour can easily be added by mocking (parts of) this class. - * - * Note that the current PlayerController implementations seem to be responsible for handling some game logic, - * and even aside from that, they are theoretically capable of making illegal choices (which are then not blocked by the real game logic). - * Test cases that need to override the default behaviour of this class should make sure to do so in a way that does not invalidate their correctness. - */ -public class PlayerControllerForTests extends PlayerController { - private PlayerActions playerActions; - - public PlayerControllerForTests(Game game, Player player, LobbyPlayer lobbyPlayer) { - super(game, player, lobbyPlayer); - } - - public void setPlayerActions(PlayerActions playerActions) { - this.playerActions = playerActions; - } - - public PlayerActions getPlayerActions() { - return playerActions; - } - - public Player getPlayer() { - return player; - } - - public Game getGame() { - return game; - } - - @Override - public void playSpellAbilityForFree(SpellAbility copySA, boolean mayChoseNewTargets) { - throw new IllegalStateException("Callers of this method currently assume that it performs extra functionality!"); - } - - @Override - public void playSpellAbilityNoStack(SpellAbility effectSA, boolean mayChoseNewTargets) { - //TODO: eventually (when the real code is refactored) this should be handled normally... - if (effectSA.getDescription().equals("At the beginning of your upkeep, if you have exactly 1 life, you win the game.")) {//test_104_2b_effect_may_state_that_player_wins_the_game - HumanPlay.playSpellAbilityNoStack(null, player, effectSA, !mayChoseNewTargets); - return; - } - SpellAbilityAi sai = SpellApiToAi.Converter.get(effectSA.getApi()); - if ( - (effectSA.getHostCard().getName().equals("Nefarious Lich") && sai instanceof DrawAi) || - (effectSA.getHostCard().getName().equals("Laboratory Maniac") && sai instanceof GameWinAi) || - (effectSA.getHostCard().getName().equals("Nefarious Lich") && sai instanceof ChangeZoneAi) - ) {//test_104_3f_if_a_player_would_win_and_lose_simultaneously_he_loses - HumanPlay.playSpellAbilityNoStack(null, player, effectSA, !mayChoseNewTargets); - return; - } - throw new IllegalStateException("Callers of this method currently assume that it performs extra functionality!"); - } - - @Override - public List sideboard(Deck deck, GameType gameType) { - return null; // refused to side - } - - @Override - public Map assignCombatDamage(Card attacker, CardCollectionView blockers, int damageDealt, GameEntity defender, boolean overrideOrder) { - if (blockers.size() == 1 && damageDealt == 2 && ( - (attacker.getName().equals("Grizzly Bears") && blockers.get(0).getName().equals("Ajani's Sunstriker")) || - (attacker.getName().equals("Ajani's Sunstriker") && blockers.get(0).getName().equals("Grizzly Bears")) - )) {//test_104_3b_player_with_less_than_zero_life_loses_the_game_only_when_a_player_receives_priority_variant_with_combat - Map result = new HashMap(); - result.put(blockers.get(0), damageDealt); - return result; - } - throw new IllegalStateException("Erring on the side of caution here..."); - } - - @Override - public Integer announceRequirements(SpellAbility ability, String announce, boolean allowZero) { - throw new IllegalStateException("Erring on the side of caution here..."); - } - - @Override - public CardCollectionView choosePermanentsToSacrifice(SpellAbility sa, int min, int max, CardCollectionView validTargets, String message) { - return chooseItems(validTargets, min); - } - - @Override - public CardCollectionView choosePermanentsToDestroy(SpellAbility sa, int min, int max, CardCollectionView validTargets, String message) { - return chooseItems(validTargets, min); - } - - @Override - public TargetChoices chooseNewTargetsFor(SpellAbility ability) { - throw new IllegalStateException("Erring on the side of caution here..."); - } - - @Override - public Pair chooseTarget(SpellAbility sa, List> allTargets) { - return chooseItem(allTargets); - } - - @Override - public CardCollectionView chooseCardsForEffect(CardCollectionView sourceList, SpellAbility sa, String title, int min, int max, boolean isOptional) { - return chooseItems(sourceList, max); - } - - @Override - public T chooseSingleEntityForEffect(FCollectionView optionList, DelayedReveal delayedReveal, SpellAbility sa, String title, boolean isOptional, Player targetedPlayer) { - if (delayedReveal != null) { - reveal(delayedReveal.getCards(), delayedReveal.getZone(), delayedReveal.getOwner(), delayedReveal.getMessagePrefix()); - } - return chooseItem(optionList); - } - - @Override - public SpellAbility chooseSingleSpellForEffect(List spells, SpellAbility sa, String title) { - return chooseItem(spells); - } - - @Override - public boolean confirmAction(SpellAbility sa, PlayerActionConfirmMode mode, String message) { - return true; - } - - @Override - public boolean confirmBidAction(SpellAbility sa, - PlayerActionConfirmMode bidlife, String string, int bid, Player winner) { - return false; - } - - @Override - public boolean confirmStaticApplication(Card hostCard, GameEntity affected, String logic, String message) { - return true; - } - - @Override - public boolean confirmTrigger(WrappedAbility wrapper, Map triggerParams, boolean isMandatory) { - return true; - } - - @Override - public Player chooseStartingPlayer(boolean isFirstGame) { - return this.player; - } - - @Override - public CardCollection orderBlockers(Card attacker, CardCollection blockers) { - return blockers; - } - - @Override - public List exertAttackers(List attackers) { - return Lists.newArrayList(attackers); - } - - @Override - public CardCollection orderBlocker(final Card attacker, final Card blocker, final CardCollection oldBlockers) { - final CardCollection allBlockers = new CardCollection(oldBlockers); - allBlockers.add(blocker); - return allBlockers; - } - - @Override - public CardCollection orderAttackers(Card blocker, CardCollection attackers) { - return attackers; - } - - @Override - public void reveal(CardCollectionView cards, ZoneType zone, Player owner, String messagePrefix) { - //nothing needs to be done here - } - - @Override - public void reveal(List cards, ZoneType zone, PlayerView owner, String messagePrefix) { - //nothing needs to be done here - } - - @Override - public void notifyOfValue(SpellAbility saSource, GameObject realtedTarget, String value) { - //nothing needs to be done here - } - - @Override - public ImmutablePair arrangeForScry(CardCollection topN) { - return ImmutablePair.of(topN, null); - } - - @Override - public boolean willPutCardOnTop(Card c) { - return false; - } - - @Override - public CardCollectionView orderMoveToZoneList(CardCollectionView cards, ZoneType destinationZone, SpellAbility source) { - return cards; - } - - @Override - public CardCollection chooseCardsToDiscardFrom(Player playerDiscard, SpellAbility sa, CardCollection validCards, int min, int max) { - return chooseItems(validCards, min); - } - - @Override - public CardCollectionView chooseCardsToDelve(int genericAmount, CardCollection grave) { - return CardCollection.EMPTY; - } - - @Override - public CardCollectionView chooseCardsToRevealFromHand(int min, int max, CardCollectionView valid) { - return chooseItems(valid, min); - } - - @Override - public CardCollectionView chooseCardsToDiscardUnlessType(int min, CardCollectionView hand, String param, SpellAbility sa) { - throw new IllegalStateException("Erring on the side of caution here..."); - } - - @Override - public List chooseSaToActivateFromOpeningHand(List usableFromOpeningHand) { - return usableFromOpeningHand; - } - - @Override - public Mana chooseManaFromPool(List manaChoices) { - return chooseItem(manaChoices); - } - - @Override - public boolean confirmReplacementEffect(ReplacementEffect replacementEffect, SpellAbility effectSA, String question) { - return true; - } - - @Override - public CardCollectionView getCardsToMulligan(Player firstPlayer) { - return null; - } - - @Override - public void declareAttackers(Player attacker, Combat combat) { - //Doing nothing is safe in most cases, but not all (creatures that must attack etc). TODO: introduce checks? - if (playerActions == null) { - return; - } - DeclareAttackersAction declareAttackers = playerActions.getNextActionIfApplicable(player, game, DeclareAttackersAction.class); - if (declareAttackers == null) { - return; - } - - //TODO: check that the chosen attack configuration is legal? (Including creatures that did not attack but should) - //TODO: check that the chosen attack configuration was a complete match to what was requested? - //TODO: banding (don't really care at the moment...) - - for (Map.Entry playerAttackAssignment : declareAttackers.getPlayerAttackAssignments().entrySet()) { - Player defender = getPlayerBeingAttacked(game, player, playerAttackAssignment.getValue()); - attack(combat, playerAttackAssignment.getKey(), defender); - } - for (Map.Entry planeswalkerAttackAssignment: declareAttackers.getPlaneswalkerAttackAssignments().entrySet()) { - Card defender = CardSpecificationHandler.INSTANCE.find(game.getCardsInGame(), planeswalkerAttackAssignment.getKey()); - attack(combat, planeswalkerAttackAssignment.getKey(), defender); - } - - if (!CombatUtil.validateAttackers(combat)) { - throw new IllegalStateException("Illegal attack declaration!"); - } - } - - private Player getPlayerBeingAttacked(Game game, Player attacker, PlayerSpecification defenderSpecification) { - if (defenderSpecification != null) { - return PlayerSpecificationHandler.INSTANCE.find(game.getPlayers(), defenderSpecification); - } - if (game.getPlayers().size() != 2) { - throw new IllegalStateException("Can't use implicit defender specification in this situation!"); - } - for (Player player : game.getPlayers()) { - if (!attacker.equals(player)) { - return player; - } - } - throw new IllegalStateException("Couldn't find implicit defender!"); - } - - private void attack(Combat combat, CardSpecification attackerSpecification, GameEntity defender) { - Card attacker = CardSpecificationHandler.INSTANCE.find(combat.getAttackingPlayer().getCreaturesInPlay(), attackerSpecification); - if (!CombatUtil.canAttack(attacker, defender)) { - throw new IllegalStateException(attacker + " can't attack " + defender); - } - combat.addAttacker(attacker, defender); - } - - @Override - public void declareBlockers(Player defender, Combat combat) { - //Doing nothing is safe in most cases, but not all (creatures that must block, attackers that must be blocked etc). TODO: legality checks? - if (playerActions == null) { - return; - } - DeclareBlockersAction declareBlockers = playerActions.getNextActionIfApplicable(player, game, DeclareBlockersAction.class); - if (declareBlockers == null) { - return; - } - - //TODO: check that the chosen block configuration is 100% legal? - //TODO: check that the chosen block configuration was a 100% match to what was requested? - //TODO: where do damage assignment orders get handled? - - for (Map.Entry> blockingAssignment : declareBlockers.getBlockingAssignments().asMap().entrySet()) { - Card attacker = CardSpecificationHandler.INSTANCE.find(combat.getAttackers(), blockingAssignment.getKey()); - for (CardSpecification blockerSpecification : blockingAssignment.getValue()) { - Card blocker = CardSpecificationHandler.INSTANCE.find(game, blockerSpecification); - if (!CombatUtil.canBlock(attacker, blocker)) { - throw new IllegalStateException(blocker + " can't block " + blocker); - } - combat.addBlocker(attacker, blocker); - } - } - String blockValidation = CombatUtil.validateBlocks(combat, player); - if (blockValidation != null) { - throw new IllegalStateException(blockValidation); - } - } - - @Override - public List chooseSpellAbilityToPlay() { - //TODO: This method has to return the spellability chosen by player - // It should not play the sa right from here. The code has been left as it is to quickly adapt to changed playercontroller interface - if (playerActions != null) { - CastSpellFromHandAction castSpellFromHand = playerActions.getNextActionIfApplicable(player, game, CastSpellFromHandAction.class); - if (castSpellFromHand != null) { - castSpellFromHand.castSpellFromHand(player, game); - } - - ActivateAbilityAction activateAbilityAction = playerActions.getNextActionIfApplicable(player, game, ActivateAbilityAction.class); - if (activateAbilityAction != null) { - activateAbilityAction.activateAbility(player, game); - } - } - return null; - } - - @Override - public CardCollection chooseCardsToDiscardToMaximumHandSize(int numDiscard) { - return chooseItems(player.getZone(ZoneType.Hand).getCards(), numDiscard); - } - - @Override - public boolean payManaOptional(Card card, Cost cost, SpellAbility sa, String prompt, ManaPaymentPurpose purpose) { - throw new IllegalStateException("Callers of this method currently assume that it performs extra functionality!"); - } - - @Override - public int chooseNumber(SpellAbility sa, String title, int min, int max) { - return min; - } - - @Override - public boolean chooseBinary(SpellAbility sa, String question, BinaryChoiceType kindOfChoice, Boolean defaultVal) { - return true; - } - - @Override - public boolean chooseFlipResult(SpellAbility sa, Player flipper, boolean[] results, boolean call) { - return true; - } - - @Override - public Card chooseProtectionShield(GameEntity entityBeingDamaged, List options, Map choiceMap) { - return choiceMap.get(options.get(0)); - } - - @Override - public List chooseModeForAbility(SpellAbility sa, int min, int num, boolean allowRepeat) { - throw new IllegalStateException("Erring on the side of caution here..."); - } - - @Override - public byte chooseColor(String message, SpellAbility sa, ColorSet colors) { - return Iterables.getFirst(colors, MagicColor.WHITE); - } - - @Override - public byte chooseColorAllowColorless(String message, Card card, ColorSet colors) { - return Iterables.getFirst(colors, (byte)0); - } - - private CardCollection chooseItems(CardCollectionView items, int amount) { - if (items == null || items.isEmpty()) { - return new CardCollection(items); - } - return (CardCollection)items.subList(0, Math.max(amount, items.size())); - } - - private T chooseItem(Iterable items) { - if (items == null) { - return null; - } - return Iterables.getFirst(items, null); - } - - @Override - public SpellAbility getAbilityToPlay(Card hostCard, List abilities, ITriggerEvent triggerEvent) { - // Isn't this a method invocation loop? --elcnesh - return getAbilityToPlay(hostCard, abilities); - } - - @Override - public String chooseSomeType(String kindOfType, SpellAbility sa, List validTypes, List invalidTypes, boolean isOptional) { - return chooseItem(validTypes); - } - - @Override - public Object vote(SpellAbility sa, String prompt, List options, ListMultimap votes) { - return chooseItem(options); - } - - @Override - public List chooseColors(String message, SpellAbility sa, int min, int max, List options) { - throw new UnsupportedOperationException("No idea how a test player controller would choose colors"); - } - - @Override - public CounterType chooseCounterType(List options, SpellAbility sa, String prompt, Map params) { - return Iterables.getFirst(options, CounterType.P1P1); - } - - @Override - public boolean confirmPayment(CostPart costPart, String string, SpellAbility ability) { - return true; - } - - @Override - public ReplacementEffect chooseSingleReplacementEffect(String prompt, List possibleReplacers, Map runParams) { - // TODO Auto-generated method stub - return Iterables.getFirst(possibleReplacers, null); - } - - @Override - public String chooseProtectionType(String string, SpellAbility sa, List choices) { - return choices.get(0); - } - - @Override - public boolean payCostToPreventEffect(Cost cost, SpellAbility sa, boolean alreadyPaid, FCollectionView allPayers) { - // TODO Auto-generated method stub - return false; - } - - @Override - public void orderAndPlaySimultaneousSa(List activePlayerSAs) { - for (final SpellAbility sa : activePlayerSAs) { - prepareSingleSa(sa.getHostCard(),sa,true); - ComputerUtil.playStack(sa, player, game); - } - } - - private void prepareSingleSa(final Card host, final SpellAbility sa, boolean isMandatory){ - if (sa.hasParam("TargetingPlayer")) { - Player targetingPlayer = AbilityUtils.getDefinedPlayers(host, sa.getParam("TargetingPlayer"), sa).get(0); - sa.setTargetingPlayer(targetingPlayer); - targetingPlayer.getController().chooseTargetsFor(sa); - } else { - // this code is no longer possible! - // sa.doTrigger(isMandatory, player); - } - } - - @Override - public void playTrigger(Card host, WrappedAbility wrapperAbility, boolean isMandatory) { - prepareSingleSa(host, wrapperAbility, isMandatory); - ComputerUtil.playNoStack(wrapperAbility.getActivatingPlayer(), wrapperAbility, game); - } - - @Override - public boolean playSaFromPlayEffect(SpellAbility tgtSA) { - // TODO Auto-generated method stub - boolean optional = tgtSA.hasParam("Optional"); - boolean noManaCost = tgtSA.hasParam("WithoutManaCost"); - if (tgtSA instanceof Spell) { // Isn't it ALWAYS a spell? - Spell spell = (Spell) tgtSA; - // if (spell.canPlayFromEffectAI(player, !optional, noManaCost) || !optional) { -- could not save this part - if (spell.canPlay() || !optional) { - if (noManaCost) { - ComputerUtil.playSpellAbilityWithoutPayingManaCost(player, tgtSA, game); - } else { - ComputerUtil.playStack(tgtSA, player, game); - } - } else - return false; // didn't play spell - } - return true; - - } - - @Override - public Map chooseProliferation(final SpellAbility sa) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean chooseTargetsFor(SpellAbility currentAbility) { - // no longer possible to run AI's methods on SpellAbility - // return currentAbility.doTrigger(true, player); - return false; - } - - @Override - public boolean chooseCardsPile(SpellAbility sa, CardCollectionView pile1, CardCollectionView pile2, String faceUp) { - return MyRandom.getRandom().nextBoolean(); - } - - @Override - public void revealAnte(String message, Multimap removedAnteCards) { - // test this! - } - - @Override - public CardShields chooseRegenerationShield(Card c) { - return Iterables.getFirst(c.getShields(), null); - } - - @Override - public List chooseCardsYouWonToAddToDeck(List losses) { - // TODO Auto-generated method stub - return losses; - } - - @Override - public int chooseNumber(SpellAbility sa, String title, List values, Player relatedPlayer) { - // TODO Auto-generated method stub - return Iterables.getFirst(values, Integer.valueOf(0)); - } - - @Override - public boolean payManaCost(ManaCost toPay, CostPartMana costPartMana, SpellAbility sa, String prompt /* ai needs hints as well */, boolean isActivatedSa ) { - // TODO Auto-generated method stub - ManaCostBeingPaid cost = new ManaCostBeingPaid(toPay); - return ComputerUtilMana.payManaCost(cost, sa, player); - } - - @Override - public Map chooseCardsForConvokeOrImprovise(SpellAbility sa, ManaCost manaCost, - CardCollectionView untappedCards, boolean improvise) { - // TODO: AI to choose a creature to tap would go here - // Probably along with deciding how many creatures to tap - return new HashMap(); - } - - @Override - public void playChosenSpellAbility(SpellAbility sa) { - // TODO Play abilities from here - - } - - @Override - public Card chooseSingleCardForZoneChange(ZoneType destination, - List origin, SpellAbility sa, CardCollection fetchList, DelayedReveal delayedReveal, - String selectPrompt, boolean isOptional, Player decider) { - - if (delayedReveal != null) { - reveal(delayedReveal.getCards(), delayedReveal.getZone(), delayedReveal.getOwner(), delayedReveal.getMessagePrefix()); - } - return ChangeZoneAi.chooseCardToHiddenOriginChangeZone(destination, origin, sa, fetchList, player, decider); - } - - @Override - public void resetAtEndOfTurn() { - // Not used by the controller for tests - } - - @Override - public void autoPassCancel() { - // Not used by the controller for tests - } - - @Override - public void awaitNextInput() { - // Not used by the controller for tests - } - @Override - public void cancelAwaitNextInput() { - // Not used by the controller for tests - } - - @Override - public ICardFace chooseSingleCardFace(SpellAbility sa, String message, Predicate cpp, String name) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String chooseCardName(SpellAbility sa, Predicate cpp, String valid, String message) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String chooseCardName(SpellAbility sa, List faces, String message) { - // TODO Auto-generated method stub - return null; - } - - @Override - public List chooseCardsForSplice(SpellAbility sa, List cards) { - return Lists.newArrayList(); - } - - @Override - public List chooseOptionalCosts(SpellAbility choosen, - List optionalCostValues) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/Specification.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/Specification.java deleted file mode 100644 index 8f6aecf9..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/Specification.java +++ /dev/null @@ -1,5 +0,0 @@ -package forge.gamesimulationtests.util; - -public interface Specification { - -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/SpecificationHandler.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/SpecificationHandler.java deleted file mode 100644 index 19ac80d4..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/SpecificationHandler.java +++ /dev/null @@ -1,38 +0,0 @@ -package forge.gamesimulationtests.util; - -import com.google.common.collect.Iterables; - -import org.apache.commons.lang3.StringUtils; - -import java.util.ArrayList; -import java.util.List; - -public abstract class SpecificationHandler> { - public final TYPE find(Iterable items, final SPECIFICATION specification) { - return find(items, specification, IntegerConstraint.ONE); - } - - public final TYPE find(Iterable items, final SPECIFICATION specification, final IntegerConstraint expectedNumberOfResults) { - Iterable matches = findMatches(items, specification, expectedNumberOfResults); - return Iterables.getFirst(matches, null); - } - - public final Iterable findMatches(Iterable items, final SPECIFICATION specification) { - return findMatches(items, specification, IntegerConstraint.ZERO_OR_MORE); - } - - public final Iterable findMatches(Iterable items, final SPECIFICATION specification, final IntegerConstraint expectedNumberOfResults) { - List matches = new ArrayList(); - for (TYPE item : items) { - if (matches(item, specification)) { - matches.add(item); - } - } - if (!expectedNumberOfResults.matches(matches.size())) { - throw new IllegalStateException("Expected " + expectedNumberOfResults + " results but got " + matches.size() + " in [" + StringUtils.join(items, ", ") + "]"); - } - return matches; - } - - public abstract boolean matches(TYPE item, final SPECIFICATION specification); -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecification.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecification.java deleted file mode 100644 index f9c99e8c..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecification.java +++ /dev/null @@ -1,45 +0,0 @@ -package forge.gamesimulationtests.util.card; - -import forge.game.card.Card; -import forge.game.zone.ZoneType; -import forge.gamesimulationtests.util.Specification; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -/** - * Applies to tokens as well... - */ -public class CardSpecification implements Specification { - private final String name; - private final ZoneType zoneType; - private final PlayerSpecification owner; - private final PlayerSpecification controller; - private final CardSpecification target; - - /*package-local*/ CardSpecification( final String name, final ZoneType zoneType, final PlayerSpecification owner, final PlayerSpecification controller, final CardSpecification target ) { - this.name = name; - this.zoneType = zoneType; - this.owner = owner; - this.controller = controller; - this.target = target; - } - - public String getName() { - return name; - } - - public ZoneType getZoneType() { - return zoneType; - } - - public PlayerSpecification getOwner() { - return owner; - } - - public PlayerSpecification getController() { - return controller; - } - - public CardSpecification getTarget() { - return target; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecificationBuilder.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecificationBuilder.java deleted file mode 100644 index 63670f23..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecificationBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -package forge.gamesimulationtests.util.card; - -import forge.game.zone.ZoneType; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import org.apache.commons.lang3.StringUtils; - -public class CardSpecificationBuilder { - private final String name; - private ZoneType zoneType; - private PlayerSpecification owner; - private PlayerSpecification controller; - private CardSpecification target; - - public CardSpecificationBuilder( final String name ) { - this.name = name; - } - - public CardSpecificationBuilder zone( final ZoneType zoneType ) { - this.zoneType = zoneType; - return this; - } - - public CardSpecificationBuilder hand() { - return zone( ZoneType.Hand ); - } - - public CardSpecificationBuilder battlefield() { - return zone( ZoneType.Battlefield ); - } - - public CardSpecificationBuilder library() { - return zone( ZoneType.Library ); - } - - public CardSpecificationBuilder graveyard() { - return zone( ZoneType.Graveyard ); - } - - public CardSpecificationBuilder owner( final PlayerSpecification owner ) { - this.owner = owner; - return this; - } - - public CardSpecificationBuilder controller( final PlayerSpecification controller ) { - this.controller = controller; - return this; - } - - public CardSpecificationBuilder target( final CardSpecification target ) { - this.target = target; - return this; - } - - public CardSpecification build() { - if( StringUtils.isBlank( name ) ) { - throw new IllegalStateException( "Must have a name [" + name + "]" ); - } - return new CardSpecification( name, zoneType, owner, controller, target ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecificationHandler.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecificationHandler.java deleted file mode 100644 index 15bb740a..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/card/CardSpecificationHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -package forge.gamesimulationtests.util.card; - -import forge.game.Game; -import forge.game.card.Card; -import forge.game.card.CardCollectionView; -import forge.gamesimulationtests.util.IntegerConstraint; -import forge.gamesimulationtests.util.SpecificationHandler; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationHandler; - -public class CardSpecificationHandler extends SpecificationHandler { - public static final CardSpecificationHandler INSTANCE = new CardSpecificationHandler(); - - public Card find(Game game, final CardSpecification cardSpecification) { - return find(getCardsToSearch(game, cardSpecification), cardSpecification); - } - - public Card find(Game game, final CardSpecification cardSpecification, final IntegerConstraint expectedNumberOfResults) { - return find(getCardsToSearch(game, cardSpecification), cardSpecification, expectedNumberOfResults); - } - - public boolean matches(Card card, final CardSpecification cardSpecification) { - return card.getName().equals(cardSpecification.getName()) - && (cardSpecification.getZoneType() == null || cardSpecification.getZoneType() == card.getZone().getZoneType()) - && (cardSpecification.getController() == null || PlayerSpecificationHandler.INSTANCE.matches(card.getController(), cardSpecification.getController())) - && (cardSpecification.getOwner() == null || PlayerSpecificationHandler.INSTANCE.matches(card.getOwner(), cardSpecification.getOwner())); - } - - private CardCollectionView getCardsToSearch(Game game, final CardSpecification cardSpecification) { - if ((cardSpecification.getController() == null && cardSpecification.getOwner() == null) || game.getPlayers().size() == game.getRegisteredPlayers().size()) { - return game.getCardsInGame(); - } - - if (cardSpecification.getController() != null) { - return getCardsToSearch(game, cardSpecification.getController()); - } else if (cardSpecification.getOwner() != null) { - return getCardsToSearch(game, cardSpecification.getOwner()); - } - - throw new IllegalStateException("Can't handle this case"); - } - - private CardCollectionView getCardsToSearch(Game game, final PlayerSpecification relevantPlayer) { - return PlayerSpecificationHandler.INSTANCE.find(game, relevantPlayer).getAllCards(); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/gamestate/GameStateSpecification.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/gamestate/GameStateSpecification.java deleted file mode 100644 index b84ebd05..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/gamestate/GameStateSpecification.java +++ /dev/null @@ -1,26 +0,0 @@ -package forge.gamesimulationtests.util.gamestate; - -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -public class GameStateSpecification { - private final List cards; - private final Map playerFacts; - - /*package*protected*/ GameStateSpecification( final List cards, final Map playerFacts ) { - this.cards = cards; - this.playerFacts = playerFacts; - } - - public List getCards() { - return cards; - } - - public Collection getPlayerFacts() { - return playerFacts.values(); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/gamestate/GameStateSpecificationBuilder.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/gamestate/GameStateSpecificationBuilder.java deleted file mode 100644 index 2ad376bf..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/gamestate/GameStateSpecificationBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -package forge.gamesimulationtests.util.gamestate; - -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.card.CardSpecificationBuilder; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationBuilder; - -import java.util.*; - -public class GameStateSpecificationBuilder { - private final List cards; - private final Map playerFacts; - - public GameStateSpecificationBuilder() { - cards = new ArrayList(); - playerFacts = new HashMap(); - } - - public GameStateSpecificationBuilder addCard( final CardSpecification cardSpecification ) { - cards.add( cardSpecification ); - return this; - } - - public GameStateSpecificationBuilder addCard( final CardSpecificationBuilder cardSpecification ) { - return addCard( cardSpecification.build() ); - } - - public GameStateSpecificationBuilder addPlayerFact( final PlayerSpecification playerSpecification ) { - if( playerFacts.containsKey( playerSpecification.getName() ) ) { - throw new IllegalStateException( "If you want to specify multiple things about the same player, do it in 1 call" ); - } - playerFacts.put( playerSpecification.getName(), playerSpecification ); - return this; - } - - public GameStateSpecificationBuilder addPlayerFact( final PlayerSpecificationBuilder playerSpecification ) { - return addPlayerFact( playerSpecification.build() ); - } - - public GameStateSpecification build() { - return new GameStateSpecification( Collections.unmodifiableList( cards ), Collections.unmodifiableMap( playerFacts ) ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecification.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecification.java deleted file mode 100644 index fbe1beea..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecification.java +++ /dev/null @@ -1,34 +0,0 @@ -package forge.gamesimulationtests.util.player; - -import forge.game.player.Player; -import forge.gamesimulationtests.util.Specification; - -public class PlayerSpecification implements Specification { - //Tests currently create player objects of type "Human" (to avoid extra AI logic creeping in), which means the HotSeat logic kicks in and assigns these default names - public static final String PLAYER_1_NAME = "Player 1"; - public static final String PLAYER_2_NAME = "Player 2"; - public static final PlayerSpecification PLAYER_1 = PlayerSpecificationBuilder.player1().build(); - public static final PlayerSpecification PLAYER_2 = PlayerSpecificationBuilder.player2().build(); - - private final String name; - private final Integer life; - private final Integer poison; - - /*package-local*/ PlayerSpecification( final String name, final Integer life, final Integer poison ) { - this.name = name; - this.life = life; - this.poison = poison; - } - - public String getName() { - return name; - } - - public Integer getLife() { - return life; - } - - public Integer getPoison() { - return poison; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecificationBuilder.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecificationBuilder.java deleted file mode 100644 index a0c700ab..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecificationBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -package forge.gamesimulationtests.util.player; - -import org.apache.commons.lang3.StringUtils; - -public class PlayerSpecificationBuilder { - private final String name; - private Integer life; - private Integer poison; - - public PlayerSpecificationBuilder( final String name ) { - this.name = name; - } - - public static PlayerSpecificationBuilder player1() { - return new PlayerSpecificationBuilder( PlayerSpecification.PLAYER_1_NAME ); - } - - public static PlayerSpecificationBuilder player2() { - return new PlayerSpecificationBuilder( PlayerSpecification.PLAYER_2_NAME ); - } - - public PlayerSpecificationBuilder life( final Integer life ) { - this.life = life; - return this; - } - - public PlayerSpecificationBuilder poison( final Integer poison ) { - this.poison = poison; - return this; - } - - public PlayerSpecification build() { - if( StringUtils.isBlank( name ) ) { - throw new IllegalStateException( "Must have a name [" + name + "]" ); - } - if( poison != null && poison < 0 ) { - throw new IllegalStateException( "Can't have negative poison counters" ); - } - return new PlayerSpecification( name, life, poison ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecificationHandler.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecificationHandler.java deleted file mode 100644 index 3c33b200..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/player/PlayerSpecificationHandler.java +++ /dev/null @@ -1,24 +0,0 @@ -package forge.gamesimulationtests.util.player; - -import forge.game.Game; -import forge.game.player.Player; -import forge.gamesimulationtests.util.IntegerConstraint; -import forge.gamesimulationtests.util.SpecificationHandler; - -public class PlayerSpecificationHandler extends SpecificationHandler { - public static final PlayerSpecificationHandler INSTANCE = new PlayerSpecificationHandler(); - - public Player find(Game game, final PlayerSpecification playerSpecification) { - return find(game.getRegisteredPlayers(), playerSpecification); - } - - public Player find(Game game, final PlayerSpecification playerSpecification, final IntegerConstraint expectedNumberOfResults) { - return find(game.getRegisteredPlayers(), playerSpecification, expectedNumberOfResults); - } - - @Override - public boolean matches(Player player, final PlayerSpecification playerSpecification) { - return player.getName().equals( playerSpecification.getName()) - && (playerSpecification.getLife() == null || playerSpecification.getLife().equals(player.getLife())); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/ActionPreCondition.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/ActionPreCondition.java deleted file mode 100644 index b2860260..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/ActionPreCondition.java +++ /dev/null @@ -1,38 +0,0 @@ -package forge.gamesimulationtests.util.playeractions; - -import forge.game.Game; -import forge.game.phase.PhaseType; - -/** This class allows you to specify that an action should only happen on turn X, during phase Y, ... - */ -public class ActionPreCondition { - private Integer requiredTurn; - private PhaseType requiredPhaseType; - - public boolean isApplicable( Game game ) { - if( requiredTurn != null ) { - if( requiredTurn != game.getPhaseHandler().getTurn() ) { - return false; - } - if( requiredTurn < game.getPhaseHandler().getTurn() ) { - throw new IllegalStateException( "Mock action " + this + " can only trigger during turn " + requiredTurn + " but it is already turn " + game.getPhaseHandler().getTurn() ); - } - } - - if( requiredPhaseType != null && requiredPhaseType != game.getPhaseHandler().getPhase() ) { - return false; - } - - return true; - } - - public ActionPreCondition turn( int turn ) { - requiredTurn = turn; - return this; - } - - public ActionPreCondition phase( PhaseType phaseType ) { - requiredPhaseType = phaseType; - return this; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/ActivateAbilityAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/ActivateAbilityAction.java deleted file mode 100644 index 39294020..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/ActivateAbilityAction.java +++ /dev/null @@ -1,36 +0,0 @@ -package forge.gamesimulationtests.util.playeractions; - -import forge.game.Game; -import forge.game.card.Card; -import forge.game.player.Player; -import forge.game.spellability.SpellAbility; -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.card.CardSpecificationHandler; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -import java.util.List; - -//TODO: almost everything (picking the right ability to activate, choosing targets, paying costs, ...) -public class ActivateAbilityAction extends BasePlayerAction { - private final CardSpecification cardWithAbility; - - public ActivateAbilityAction( PlayerSpecification player, CardSpecification cardWithAbility ) { - super( player ); - this.cardWithAbility = cardWithAbility; - } - - public void activateAbility( Player player, Game game ) { - Card actualCardWithAbility = CardSpecificationHandler.INSTANCE.find( game, cardWithAbility ); - - List abilities = actualCardWithAbility.getAllPossibleAbilities( player, true ); - if( abilities.isEmpty() ) { - throw new IllegalStateException( "No abilities found for " + actualCardWithAbility ); - } - if( abilities.size() > 1 ) { - throw new IllegalStateException( "Multiple abilities found for " + actualCardWithAbility ); - } - - SpellAbility ability = abilities.get( 0 ); - game.getStack().add( ability ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/BasePlayerAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/BasePlayerAction.java deleted file mode 100644 index 5ef676a5..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/BasePlayerAction.java +++ /dev/null @@ -1,26 +0,0 @@ -package forge.gamesimulationtests.util.playeractions; - -import forge.game.Game; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -public abstract class BasePlayerAction { - private final PlayerSpecification player; - private ActionPreCondition preCondition; - - protected BasePlayerAction( PlayerSpecification player ) { - this.player = player; - } - - public PlayerSpecification getPlayer() { - return player; - } - - public boolean isApplicable( Game game ) { - return preCondition == null || preCondition.isApplicable( game ); - } - - public BasePlayerAction when( ActionPreCondition preCondition ) { - this.preCondition = preCondition; - return this; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/CastSpellFromHandAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/CastSpellFromHandAction.java deleted file mode 100644 index da9f50e9..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/CastSpellFromHandAction.java +++ /dev/null @@ -1,41 +0,0 @@ -package forge.gamesimulationtests.util.playeractions; - -import forge.game.Game; -import forge.game.card.Card; -import forge.game.card.CardCollectionView; -import forge.game.player.Player; -import forge.game.spellability.SpellAbility; -import forge.game.zone.ZoneType; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -/** - * TODO: better rules compliance (sorcery speed stuff, paying mana, ...) - */ -public class CastSpellFromHandAction extends BasePlayerAction { - private final String spellName; - - public CastSpellFromHandAction(PlayerSpecification player, String spellName0) { - super(player); - spellName = spellName0; - } - - public void castSpellFromHand(Player player, Game game) { - CardCollectionView cardsInHand = player.getCardsIn(ZoneType.Hand); - Card cardToPlay = null; - for (Card card : cardsInHand) { - if (spellName.equals(card.getName())) { - cardToPlay = card; - } - } - if (cardToPlay == null) { - throw new IllegalStateException( "Couldn't find " + spellName ); - } - - SpellAbility spellAbility = cardToPlay.getSpells().get(0); - spellAbility.setActivatingPlayer(player); - spellAbility.setHostCard(game.getAction().moveToStack(cardToPlay, spellAbility)); - spellAbility.getTargets().add(player); - game.getStack().freezeStack(); - game.getStack().addAndUnfreeze(spellAbility); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/DeclareAttackersAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/DeclareAttackersAction.java deleted file mode 100644 index bf101847..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/DeclareAttackersAction.java +++ /dev/null @@ -1,44 +0,0 @@ -package forge.gamesimulationtests.util.playeractions; - -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -import java.util.HashMap; -import java.util.Map; - -public class DeclareAttackersAction extends BasePlayerAction { - private final Map playerAttackAssignments; - private final Map planeswalkerAttackAssignments; - - public DeclareAttackersAction( PlayerSpecification player ) { - super( player ); - playerAttackAssignments = new HashMap(); - planeswalkerAttackAssignments = new HashMap(); - } - - /** - * Attack the only opponent - */ - public DeclareAttackersAction attack( CardSpecification attacker ) { - playerAttackAssignments.put( attacker, null ); - return this; - } - - public DeclareAttackersAction attack( CardSpecification attacker, PlayerSpecification player ) { - playerAttackAssignments.put( attacker, player ); - return this; - } - - public DeclareAttackersAction attack( CardSpecification attacker, CardSpecification planeswalker ) { - planeswalkerAttackAssignments.put( attacker, planeswalker ); - return this; - } - - public Map getPlayerAttackAssignments() { - return playerAttackAssignments; - } - - public Map getPlaneswalkerAttackAssignments() { - return planeswalkerAttackAssignments; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/DeclareBlockersAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/DeclareBlockersAction.java deleted file mode 100644 index 959052a3..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/DeclareBlockersAction.java +++ /dev/null @@ -1,24 +0,0 @@ -package forge.gamesimulationtests.util.playeractions; - -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -public class DeclareBlockersAction extends BasePlayerAction { - private final Multimap blockingAssignments; - - public DeclareBlockersAction( PlayerSpecification player ) { - super( player ); - blockingAssignments = ArrayListMultimap.create(); - } - - public DeclareBlockersAction block( CardSpecification attacker, CardSpecification blocker ) { - blockingAssignments.put( attacker, blocker ); - return this; - } - - public Multimap getBlockingAssignments() { - return blockingAssignments; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/PlayerActions.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/PlayerActions.java deleted file mode 100644 index 3117868e..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/PlayerActions.java +++ /dev/null @@ -1,61 +0,0 @@ -package forge.gamesimulationtests.util.playeractions; - -import forge.game.Game; -import forge.game.player.Player; -import forge.gamesimulationtests.util.player.PlayerSpecificationHandler; -import forge.gamesimulationtests.util.playeractions.testactions.TestAction; -import org.apache.commons.lang3.StringUtils; - -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; - -public class PlayerActions { - private final List playerActions; - - public PlayerActions( List playerActions ) { - this.playerActions = new LinkedList( playerActions ); - } - - public PlayerActions( BasePlayerAction... basePlayerActions ) { - this( Arrays.asList( basePlayerActions ) ); - } - - @SuppressWarnings("unchecked") - public T getNextActionIfApplicable( Player player, Game game, Class actionType ) { - if( playerActions.isEmpty() ) { - return null; - } - final BasePlayerAction nextAction = playerActions.get( 0 ); - - if( nextAction instanceof TestAction && isRightPlayer( player, game, nextAction ) && isApplicable( nextAction, game ) ) { - playerActions.remove( 0 ); - ( ( TestAction ) nextAction ).perform( game, player ); - return getNextActionIfApplicable( player, game, actionType ); - } - - if( actionType.isAssignableFrom( nextAction.getClass() ) && isRightPlayer( player, game, nextAction ) && isApplicable( nextAction, game ) ) { - playerActions.remove( 0 ); - return ( T ) nextAction; - } - - return null; - } - - private boolean isApplicable( BasePlayerAction action, Game game ) { - return action != null && action.isApplicable( game ); - } - - private boolean isRightPlayer( Player player, Game game, BasePlayerAction action ) { - return action.getPlayer() == null || player.equals( PlayerSpecificationHandler.INSTANCE.find( game, action.getPlayer() ) ); - } - - public boolean isEmpty() { - return playerActions.isEmpty(); - } - - @Override - public String toString() { - return "PlayerActions : [" + StringUtils.join( playerActions, ", " ) + "]"; - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/AssertAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/AssertAction.java deleted file mode 100644 index 235e5873..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/AssertAction.java +++ /dev/null @@ -1,17 +0,0 @@ -package forge.gamesimulationtests.util.playeractions.testactions; - -import forge.game.Game; -import forge.game.player.Player; - -public abstract class AssertAction extends TestAction { - public AssertAction() { - super( null );//AssertActions may be about a player, but they're not really actions taken by a player... - } - - public abstract void performAssertion( Game game ); - - @Override - public void perform( Game game, Player player ) { - performAssertion( game ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/CardAssertAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/CardAssertAction.java deleted file mode 100644 index a4d1b619..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/CardAssertAction.java +++ /dev/null @@ -1,27 +0,0 @@ -package forge.gamesimulationtests.util.playeractions.testactions; - -import forge.game.Game; -import forge.game.card.Card; -import forge.gamesimulationtests.util.IntegerConstraint; -import forge.gamesimulationtests.util.card.CardSpecification; -import forge.gamesimulationtests.util.card.CardSpecificationBuilder; -import forge.gamesimulationtests.util.card.CardSpecificationHandler; -import org.testng.Assert; - -public class CardAssertAction extends AssertAction { - private final CardSpecification cardRequirements; - - public CardAssertAction( final CardSpecification cardRequirements ) { - this.cardRequirements = cardRequirements; - } - - public CardAssertAction( final CardSpecificationBuilder cardRequirements ) { - this( cardRequirements.build() ); - } - - @Override - public void performAssertion( final Game game ) { - final Card card = CardSpecificationHandler.INSTANCE.find( game, cardRequirements, IntegerConstraint.ZERO_OR_ONE ); - Assert.assertNotNull( card ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/EndTestAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/EndTestAction.java deleted file mode 100644 index 1550e200..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/EndTestAction.java +++ /dev/null @@ -1,20 +0,0 @@ -package forge.gamesimulationtests.util.playeractions.testactions; - -import forge.game.Game; -import forge.game.player.Player; -import forge.gamesimulationtests.util.player.PlayerSpecification; - -public class EndTestAction extends TestAction { - public EndTestAction( PlayerSpecification player ) { - super( player ); - } - - public void endTest( Player player ) { - player.concede(); - } - - @Override - public void perform( Game game, Player player ) { - endTest( player ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/PlayerAssertAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/PlayerAssertAction.java deleted file mode 100644 index a48afc75..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/PlayerAssertAction.java +++ /dev/null @@ -1,27 +0,0 @@ -package forge.gamesimulationtests.util.playeractions.testactions; - -import forge.game.Game; -import forge.game.player.Player; -import forge.gamesimulationtests.util.IntegerConstraint; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.player.PlayerSpecificationBuilder; -import forge.gamesimulationtests.util.player.PlayerSpecificationHandler; -import org.testng.Assert; - -public class PlayerAssertAction extends AssertAction { - private final PlayerSpecification playerRequirements; - - public PlayerAssertAction( final PlayerSpecification playerRequirements ) { - this.playerRequirements = playerRequirements; - } - - public PlayerAssertAction( final PlayerSpecificationBuilder playerRequirements ) { - this( playerRequirements.build() ); - } - - @Override - public void performAssertion( Game game ) { - final Player player = PlayerSpecificationHandler.INSTANCE.find( game, playerRequirements, IntegerConstraint.ZERO_OR_ONE ); - Assert.assertNotNull( player ); - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/TestAction.java b/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/TestAction.java deleted file mode 100644 index bfcca5f2..00000000 --- a/forge-gui-desktop/src/test/java/forge/gamesimulationtests/util/playeractions/testactions/TestAction.java +++ /dev/null @@ -1,14 +0,0 @@ -package forge.gamesimulationtests.util.playeractions.testactions; - -import forge.game.Game; -import forge.game.player.Player; -import forge.gamesimulationtests.util.player.PlayerSpecification; -import forge.gamesimulationtests.util.playeractions.BasePlayerAction; - -public abstract class TestAction extends BasePlayerAction { - public TestAction( PlayerSpecification player ) { - super( player ); - } - - public abstract void perform( Game game, Player player ); -} diff --git a/forge-gui-desktop/src/test/java/forge/gui/ListChooserTest.java b/forge-gui-desktop/src/test/java/forge/gui/ListChooserTest.java deleted file mode 100644 index 01d85a4f..00000000 --- a/forge-gui-desktop/src/test/java/forge/gui/ListChooserTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package forge.gui; - -import org.testng.annotations.Test; - -import java.util.Arrays; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }, timeOut = 1000, enabled = false) -public class ListChooserTest { - - /** - * List chooser test1. - */ - @Test(groups = { "UnitTest", "fast" }, timeOut = 1000, enabled = false) - public void listChooserTest1() { - final ListChooser c = new ListChooser("choose a or b", 0, 2, Arrays.asList("a", "b"), null); - System.out.println(c.show()); - for (final String s : c.getSelectedValues()) { - System.out.println(s); - } - } -} diff --git a/forge-gui-desktop/src/test/java/forge/gui/game/CardDetailPanelTest.java b/forge-gui-desktop/src/test/java/forge/gui/game/CardDetailPanelTest.java deleted file mode 100644 index be4895e7..00000000 --- a/forge-gui-desktop/src/test/java/forge/gui/game/CardDetailPanelTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package forge.gui.game; - -import forge.gui.CardDetailPanel; -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Created by IntelliJ IDEA. User: dhudson - */ -@Test(groups = { "UnitTest" }, enabled = false) -public class CardDetailPanelTest { - - /** - * Card detail panel test1. - */ - @Test(groups = { "UnitTest", "fast" }, enabled = false) - public void cardDetailPanelTest1() { - try { - CardDetailPanel dialog = new CardDetailPanel(); - // dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - Assert.assertNotNull(dialog); - dialog = null; - } catch (final Exception e) { - e.printStackTrace(); - } - } -} diff --git a/forge-gui-desktop/src/test/java/forge/item/DeckHintsTest.java b/forge-gui-desktop/src/test/java/forge/item/DeckHintsTest.java deleted file mode 100644 index 2eb6f978..00000000 --- a/forge-gui-desktop/src/test/java/forge/item/DeckHintsTest.java +++ /dev/null @@ -1,178 +0,0 @@ -package forge.item; - -import java.io.File; -import java.util.*; - - -import com.google.common.collect.Iterables; -import junit.framework.Assert; - -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import forge.GuiBase; -import forge.GuiDesktop; -import forge.card.CardRarity; -import forge.card.CardRules; -import forge.card.DeckHints; -import forge.properties.ForgeConstants; -import forge.util.FileUtil; - -/** - * Tests for DeckHints. - * - */ -@Test(timeOut = 1000, enabled = true) -public class DeckHintsTest { - - @BeforeTest - void setupTest() { - GuiBase.setInterface(new GuiDesktop()); - } - - /** - * Card test. - */ - @Test(timeOut = 1000, enabled = true) - void test() { - PaperCard cp = readCard("griffin_rider.txt"); - Assert.assertEquals("Griffin Rider", cp.getName()); - DeckHints hints = cp.getRules().getAiHints().getDeckHints(); - Assert.assertNotNull(hints); - Assert.assertTrue(hints.isValid()); - - List list = new ArrayList(); - list.add(readCard("assault_griffin.txt")); - list.add(readCard("auramancer.txt")); - - List filtered = hints.filter(list); - Assert.assertEquals(1, filtered.size()); - Assert.assertEquals("Assault Griffin", filtered.get(0).getName()); - } - - /** - * Filter for cards. - */ - @Test(timeOut = 1000, enabled = true) - void testCards() { - PaperCard cp = readCard("throne_of_empires.txt"); - Assert.assertEquals("Throne of Empires", cp.getName()); - DeckHints hints = cp.getRules().getAiHints().getDeckHints(); - Assert.assertNotNull(hints); - Assert.assertTrue(hints.isValid()); - - List list = new ArrayList(); - list.add(readCard("assault_griffin.txt")); - list.add(readCard("scepter_of_empires.txt")); - list.add(readCard("crown_of_empires.txt")); - - Assert.assertEquals(2, hints.filter(list).size()); - } - - /** - * Filter for keywords. - */ - @Test(timeOut = 1000, enabled = true) - void testKeywords() { - IPaperCard cp = readCard("mwonvuli_beast_tracker.txt"); - DeckHints hints = cp.getRules().getAiHints().getDeckHints(); - Assert.assertNotNull(hints); - Assert.assertTrue(hints.isValid()); - - List list = new ArrayList(); - list.add(readCard("acidic_slime.txt")); - list.add(readCard("ajanis_sunstriker.txt")); - - Assert.assertEquals(1, hints.filter(list).size()); - } - - /** - * Filter for color. - */ - @Test(timeOut = 1000, enabled = true) - void testColor() { - IPaperCard cp = readCard("wurms_tooth.txt"); - DeckHints hints = cp.getRules().getAiHints().getDeckNeeds(); - Assert.assertNotNull(hints); - Assert.assertTrue(hints.isValid()); - - List list = new ArrayList(); - list.add(readCard("llanowar_elves.txt")); - list.add(readCard("unsummon.txt")); - - Assert.assertEquals(1, hints.filter(list).size()); - } - - /** - * - * Test for no wants. - */ - @Test(timeOut = 1000, enabled = true) - void testNoFilter() { - PaperCard cp = readCard("assault_griffin.txt"); - DeckHints hints = cp.getRules().getAiHints().getDeckHints(); - Assert.assertEquals("Assault Griffin", cp.getName()); - Assert.assertNull(hints); - } - - /** - * Test for multiple. - */ - @Test(timeOut = 1000, enabled = true) - void testMultiple() { - PaperCard pc = readCard("ruination_guide.txt"); - DeckHints hints = pc.getRules().getAiHints().getDeckHints(); - Assert.assertNotNull(hints); - Assert.assertTrue(hints.isValid()); - - List list = new ArrayList(); - list.add(readCard("assault_griffin.txt")); - list.add(readCard("breaker_of_armies.txt")); - list.add(readCard("benthic_infiltrator.txt")); - - Map> filterByType = hints.filterByType(list); - Assert.assertEquals(1, Iterables.size(filterByType.get(DeckHints.Type.KEYWORD))); - Assert.assertEquals(1, Iterables.size(filterByType.get(DeckHints.Type.COLOR))); - } - - /** - * Test for has ability. - */ - @Test(timeOut = 1000, enabled = true) - void testDeckHasAbility() { - PaperCard pc = readCard("kozileks_channeler.txt"); - DeckHints has = pc.getRules().getAiHints().getDeckHas(); - Assert.assertNotNull(has); - - PaperCard pc2 = readCard("kozileks_pathfinder.txt"); - DeckHints hints = pc2.getRules().getAiHints().getDeckHints(); - - List list = new ArrayList<>(); - list.add(pc); - list.add(readCard("assault_griffin.txt")); - - Assert.assertEquals(1, hints.filter(list).size()); - } - - - /** - * Create a CardPrinted from the given filename. - * - * @param filename - * the filename - * @return the CardPrinted - */ - protected PaperCard readCard(String filename) { - String firstLetter = filename.substring(0, 1); - File dir = new File(ForgeConstants.CARD_DATA_DIR, firstLetter); - File txtFile = new File(dir, filename); - - CardRules.Reader crr = new CardRules.Reader(); - for (String line : FileUtil.readFile(txtFile)) { - crr.parseLine(line); - } - // Don't care what the actual set or rarity is here. - return new PaperCard(crr.getCard(), "M11", CardRarity.Common, 0); - } - -} diff --git a/forge-gui-desktop/src/test/java/forge/model/FModelTest.java b/forge-gui-desktop/src/test/java/forge/model/FModelTest.java deleted file mode 100644 index a8bb7fca..00000000 --- a/forge-gui-desktop/src/test/java/forge/model/FModelTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package forge.model; - -import forge.error.ExceptionHandler; -import forge.properties.ForgePreferences; -import forge.util.BuildInfo; - -import org.testng.Assert; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import java.io.FileNotFoundException; -import java.io.IOException; - -/** - * Tests FModel. - */ -@Test(enabled = false) -public class FModelTest { - /** - * Set up before each test, creating a default model. - * - * @throws FileNotFoundException - * indirectly - */ - @BeforeTest - public final void setUp() throws FileNotFoundException { - // this.model = new FModel(); - } - - /** - * Close the model after each test if it isn't null. - */ - @AfterTest - public final void tearDown() { - try { - ExceptionHandler.unregisterErrorHandling(); - } catch (final Throwable ignored) { - // ignore exceptions during close. - } - } - - /** - * Test constructor (via setUp), close, and construct again. - * - * @throws FileNotFoundException - * if something is really wrong - */ - @Test(enabled = false) - public final void test_ctor_close_ctor() throws IOException { - // by - // Braids - // on - // 8/12/11 - // 10:36 - // AM - ExceptionHandler.unregisterErrorHandling(); - - System.err.println("log test"); - } - - /** - * Test getVersion. - * - * @throws FileNotFoundException - * if something is really wrong - */ - @Test(enabled = false) - public final void test_getVersion() throws FileNotFoundException { - final String version = BuildInfo.getVersionString(); - - Assert.assertEquals(version, "SVN", "version is default"); - } - - /** - * Test getPreferences. - * - * @throws FileNotFoundException - * indirectly - */ - @Test(enabled = false) - public final void test_getPreferences() throws FileNotFoundException { - final ForgePreferences prefs = FModel.getPreferences(); - Assert.assertNotNull(prefs, "prefs instance is not null"); - } - -} diff --git a/forge-gui-desktop/target/.gitignore b/forge-gui-desktop/target/.gitignore new file mode 100644 index 00000000..45698379 --- /dev/null +++ b/forge-gui-desktop/target/.gitignore @@ -0,0 +1,2 @@ +/classes/ +/test-classes/ diff --git a/forge-gui-desktop/target/antrun/build-main.xml b/forge-gui-desktop/target/antrun/build-main.xml new file mode 100644 index 00000000..5f748417 --- /dev/null +++ b/forge-gui-desktop/target/antrun/build-main.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/forge-gui-ios/.classpath b/forge-gui-ios/.classpath index ed9f6578..8c61178c 100644 --- a/forge-gui-ios/.classpath +++ b/forge-gui-ios/.classpath @@ -1,31 +1,21 @@ - - - - - - - - - - - - - - - - + + + + + + + + - - diff --git a/forge-gui-ios/.gitignore b/forge-gui-ios/.gitignore new file mode 100644 index 00000000..84c048a7 --- /dev/null +++ b/forge-gui-ios/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/forge-gui-ios/.project b/forge-gui-ios/.project index 0b6a8932..050ecf6d 100644 --- a/forge-gui-ios/.project +++ b/forge-gui-ios/.project @@ -17,6 +17,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.robovm.eclipse.RoboVMClassBuilder @@ -32,5 +37,6 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.jdt.core.javanature org.robovm.eclipse.RoboVMNature + org.eclipse.buildship.core.gradleprojectnature diff --git a/forge-gui-ios/.settings/org.eclipse.buildship.core.prefs b/forge-gui-ios/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..1b6cac23 --- /dev/null +++ b/forge-gui-ios/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:29:55 CEST 2017 +connection.project.dir=.. diff --git a/forge-gui-ios/target/classes/forge/ios/Main$IOSAdapter.class b/forge-gui-ios/target/classes/forge/ios/Main$IOSAdapter.class new file mode 100644 index 00000000..2c0c5869 Binary files /dev/null and b/forge-gui-ios/target/classes/forge/ios/Main$IOSAdapter.class differ diff --git a/forge-gui-ios/target/classes/forge/ios/Main$IOSClipboard.class b/forge-gui-ios/target/classes/forge/ios/Main$IOSClipboard.class new file mode 100644 index 00000000..e2a1cedf Binary files /dev/null and b/forge-gui-ios/target/classes/forge/ios/Main$IOSClipboard.class differ diff --git a/forge-gui-ios/target/classes/forge/ios/Main.class b/forge-gui-ios/target/classes/forge/ios/Main.class new file mode 100644 index 00000000..bfd611ab Binary files /dev/null and b/forge-gui-ios/target/classes/forge/ios/Main.class differ diff --git a/forge-gui-mobile-dev/target/classes/forge/app/Main$DesktopAdapter.class b/forge-gui-mobile-dev/target/classes/forge/app/Main$DesktopAdapter.class new file mode 100644 index 00000000..f5fbfe33 Binary files /dev/null and b/forge-gui-mobile-dev/target/classes/forge/app/Main$DesktopAdapter.class differ diff --git a/forge-gui-mobile-dev/target/classes/forge/app/Main.class b/forge-gui-mobile-dev/target/classes/forge/app/Main.class new file mode 100644 index 00000000..e349a77f Binary files /dev/null and b/forge-gui-mobile-dev/target/classes/forge/app/Main.class differ diff --git a/forge-gui-mobile/.classpath b/forge-gui-mobile/.classpath index 6fb83883..ffe40ba7 100644 --- a/forge-gui-mobile/.classpath +++ b/forge-gui-mobile/.classpath @@ -1,22 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + diff --git a/forge-gui-mobile/.project b/forge-gui-mobile/.project index 82f0c031..3c5fd670 100644 --- a/forge-gui-mobile/.project +++ b/forge-gui-mobile/.project @@ -10,6 +10,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.m2e.core.maven2Builder @@ -19,5 +24,6 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature diff --git a/forge-gui-mobile/.settings/org.eclipse.buildship.core.prefs b/forge-gui-mobile/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..1b6cac23 --- /dev/null +++ b/forge-gui-mobile/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:29:55 CEST 2017 +connection.project.dir=.. diff --git a/forge-gui-mobile/.settings/org.eclipse.jdt.core.prefs b/forge-gui-mobile/.settings/org.eclipse.jdt.core.prefs index f4217b01..df46a9ac 100644 --- a/forge-gui-mobile/.settings/org.eclipse.jdt.core.prefs +++ b/forge-gui-mobile/.settings/org.eclipse.jdt.core.prefs @@ -1,12 +1,12 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/forge-gui-mobile/target/.gitignore b/forge-gui-mobile/target/.gitignore new file mode 100644 index 00000000..840e7d31 --- /dev/null +++ b/forge-gui-mobile/target/.gitignore @@ -0,0 +1 @@ +/classes/ diff --git a/forge-gui/.classpath b/forge-gui/.classpath index 3c4e0e68..2f99c1d1 100644 --- a/forge-gui/.classpath +++ b/forge-gui/.classpath @@ -2,9 +2,9 @@ - - + + diff --git a/forge-gui/.project b/forge-gui/.project index 1d65fa5a..bbca1bb0 100644 --- a/forge-gui/.project +++ b/forge-gui/.project @@ -1,6 +1,6 @@ - forge-gui + mtg-forge-gradle-forge-gui @@ -10,6 +10,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.m2e.core.maven2Builder @@ -19,5 +24,6 @@ org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature + org.eclipse.buildship.core.gradleprojectnature diff --git a/forge-gui/.settings/org.eclipse.buildship.core.prefs b/forge-gui/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..cfe3ba86 --- /dev/null +++ b/forge-gui/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:29:54 CEST 2017 +connection.project.dir=.. diff --git a/forge-gui/.settings/org.eclipse.jdt.core.prefs b/forge-gui/.settings/org.eclipse.jdt.core.prefs index ec4300d5..60105c1b 100644 --- a/forge-gui/.settings/org.eclipse.jdt.core.prefs +++ b/forge-gui/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/forge-gui/build.gradle b/forge-gui/build.gradle new file mode 100644 index 00000000..554100fa --- /dev/null +++ b/forge-gui/build.gradle @@ -0,0 +1,11 @@ +apply plugin: "java" + +sourceCompatibility = 1.6 +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + +sourceSets.main.java.srcDirs = [ "src/main/java/" ] + + +eclipse.project { + name = appName + "-forge-gui" +} diff --git a/forge-gui/target/classes/.gitignore b/forge-gui/target/classes/.gitignore new file mode 100644 index 00000000..9a20f0e1 --- /dev/null +++ b/forge-gui/target/classes/.gitignore @@ -0,0 +1 @@ +/forge/ diff --git a/forge-gui/target/classes/log4jConfig.config b/forge-gui/target/classes/log4jConfig.config new file mode 100644 index 00000000..cfd8e847 --- /dev/null +++ b/forge-gui/target/classes/log4jConfig.config @@ -0,0 +1,9 @@ +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=ALL, A1 + +# A1 is set to be a ConsoleAppender. +log4j.appender.A1=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n diff --git a/forge-gui/target/classes/proxy-template.ftl b/forge-gui/target/classes/proxy-template.ftl new file mode 100644 index 00000000..73e58c7f --- /dev/null +++ b/forge-gui/target/classes/proxy-template.ftl @@ -0,0 +1,31 @@ + + + + + + ${title} + + + +<#list urls as url> + + +
+ + + + +
+<#list cardList?keys as key> + ${cardList[key]} ${key}
+ +
+ + diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..339fa150 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.daemon=true +org.gradle.jvmargs=-Xms128m -Xmx1500m +org.gradle.configureondemand=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..bafc550b Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..0eb9142f --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 09 23:06:52 EDT 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip diff --git a/gradlew b/gradlew new file mode 100755 index 00000000..4453ccea --- /dev/null +++ b/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save ( ) { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..e95643d6 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ios-moe/.classpath b/ios-moe/.classpath new file mode 100644 index 00000000..ef12402f --- /dev/null +++ b/ios-moe/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ios-moe/.gitignore b/ios-moe/.gitignore new file mode 100644 index 00000000..84c048a7 --- /dev/null +++ b/ios-moe/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/ios-moe/.project b/ios-moe/.project new file mode 100644 index 00000000..7fafdf6f --- /dev/null +++ b/ios-moe/.project @@ -0,0 +1,24 @@ + + + mtg-forge-gradle-ios-moe + Project my-gdx-game-ios-moe created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.multi-os-engine.project + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/ios-moe/.settings/org.eclipse.buildship.core.prefs b/ios-moe/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..1b6cac23 --- /dev/null +++ b/ios-moe/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:29:55 CEST 2017 +connection.project.dir=.. diff --git a/ios-moe/bin/.gitignore b/ios-moe/bin/.gitignore new file mode 100644 index 00000000..c2d9872a --- /dev/null +++ b/ios-moe/bin/.gitignore @@ -0,0 +1 @@ +/com/ diff --git a/ios-moe/build.gradle b/ios-moe/build.gradle new file mode 100644 index 00000000..dc02b9dc --- /dev/null +++ b/ios-moe/build.gradle @@ -0,0 +1,61 @@ +// Exclude all files from Gradle's test runner +test { exclude '**' } + +task copyNatives << { + file("xcode/native/ios/").mkdirs(); + def LD_FLAGS = "LIBGDX_NATIVES = " + configurations.natives.files.each { jar-> + def outputDir = null + if (jar.name.endsWith("natives-ios.jar")) outputDir = file("xcode/native/ios") + if (outputDir != null) { + FileCollection fileCollection = zipTree(jar) + for (File libFile : fileCollection) { + if (libFile.getAbsolutePath().endsWith(".a") && !libFile.getAbsolutePath().contains("/tvos/")) { + copy { + from libFile.getAbsolutePath() + into outputDir + } + LD_FLAGS += " -force_load \${SRCROOT}/native/ios/" + libFile.getName() + } + } + } + } + def outFlags = file("xcode/ios-moe/custom.xcconfig"); + outFlags.write LD_FLAGS + + def proguard = file("proguard.append.cfg") + if (!proguard.exists()) { + proguard = new File("proguard.append.cfg") + proguard << "\n-keep class com.badlogic.** { *; }\n" + proguard << "-keep enum com.badlogic.** { *; }\n" + } +} + +sourceSets.main.java.srcDirs = [ "src/" ] + +// Setup Multi-OS Engine +moe { + xcode { + project 'xcode/ios-moe.xcodeproj' + mainTarget 'ios-moe' + testTarget 'ios-moe-Test' + } + + remoteBuild { + resources = [ file("../core/assets") ] + } +} + +moeMainReleaseIphoneosXcodeBuild.dependsOn copyNatives +moeMainDebugIphoneosXcodeBuild.dependsOn copyNatives +moeMainReleaseIphonesimulatorXcodeBuild.dependsOn copyNatives +moeMainDebugIphonesimulatorXcodeBuild.dependsOn copyNatives + +// Setup Eclipse +eclipse { + // Set Multi-OS Engine nature + project { + name = appName + "-ios-moe" + natures 'org.multi-os-engine.project' + } +} diff --git a/ios-moe/proguard.append.cfg b/ios-moe/proguard.append.cfg new file mode 100644 index 00000000..198e93a5 --- /dev/null +++ b/ios-moe/proguard.append.cfg @@ -0,0 +1,3 @@ + +-keep class com.badlogic.** { *; } +-keep enum com.badlogic.** { *; } diff --git a/ios-moe/src/com/mygdx/game/IOSMoeLauncher.java b/ios-moe/src/com/mygdx/game/IOSMoeLauncher.java new file mode 100644 index 00000000..9e26a611 --- /dev/null +++ b/ios-moe/src/com/mygdx/game/IOSMoeLauncher.java @@ -0,0 +1,26 @@ +package com.mygdx.game; + +import com.badlogic.gdx.backends.iosmoe.IOSApplication; +import com.badlogic.gdx.backends.iosmoe.IOSApplicationConfiguration; +import org.moe.natj.general.Pointer; +import com.mygdx.game.MyGdxGame; + +import apple.uikit.c.UIKit; + +public class IOSMoeLauncher extends IOSApplication.Delegate { + + protected IOSMoeLauncher(Pointer peer) { + super(peer); + } + + @Override + protected IOSApplication createApplication() { + IOSApplicationConfiguration config = new IOSApplicationConfiguration(); + config.useAccelerometer = false; + return new IOSApplication(new MyGdxGame(), config); + } + + public static void main(String[] argv) { + UIKit.UIApplicationMain(0, null, null, IOSMoeLauncher.class.getName()); + } +} diff --git a/ios-moe/xcode/ios-moe-Test/Info.plist b/ios-moe/xcode/ios-moe-Test/Info.plist new file mode 100644 index 00000000..a5a8b9d3 --- /dev/null +++ b/ios-moe/xcode/ios-moe-Test/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + MOE.Main.Class + org.moe.mdt.junit.MoeRemoteTestRunner + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/ios-moe/xcode/ios-moe-Test/main.cpp b/ios-moe/xcode/ios-moe-Test/main.cpp new file mode 100644 index 00000000..fef543a1 --- /dev/null +++ b/ios-moe/xcode/ios-moe-Test/main.cpp @@ -0,0 +1,5 @@ +#include + +int main(int argc, char *argv[]) { + return moevm(argc, argv); +} diff --git a/ios-moe/xcode/ios-moe.xcodeproj/project.pbxproj b/ios-moe/xcode/ios-moe.xcodeproj/project.pbxproj new file mode 100644 index 00000000..871d31d4 --- /dev/null +++ b/ios-moe/xcode/ios-moe.xcodeproj/project.pbxproj @@ -0,0 +1,608 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 093EA0331288EEC18D3C79EC /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E152A74253836079FA1075F /* main.cpp */; }; + 16479D2CDCAC394B9A9722FE /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8084D1F0A307440EC73CBFCA /* main.cpp */; }; + 581773911E37A0F0004E28A9 /* Default-375w-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 581773851E37A0F0004E28A9 /* Default-375w-667h@2x.png */; }; + 581773921E37A0F0004E28A9 /* Default-414w-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 581773861E37A0F0004E28A9 /* Default-414w-736h@3x.png */; }; + 581773931E37A0F0004E28A9 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 581773871E37A0F0004E28A9 /* Default-568h@2x.png */; }; + 581773941E37A0F0004E28A9 /* Default-1024w-1366h@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 581773881E37A0F0004E28A9 /* Default-1024w-1366h@2x~ipad.png */; }; + 581773951E37A0F0004E28A9 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 581773891E37A0F0004E28A9 /* Default.png */; }; + 581773961E37A0F0004E28A9 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5817738A1E37A0F0004E28A9 /* Default@2x.png */; }; + 581773971E37A0F0004E28A9 /* Default@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 5817738B1E37A0F0004E28A9 /* Default@2x~ipad.png */; }; + 581773981E37A0F0004E28A9 /* Default~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 5817738C1E37A0F0004E28A9 /* Default~ipad.png */; }; + 581773991E37A0F0004E28A9 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 5817738D1E37A0F0004E28A9 /* Icon-72.png */; }; + 5817739A1E37A0F0004E28A9 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5817738E1E37A0F0004E28A9 /* Icon-72@2x.png */; }; + 5817739B1E37A0F0004E28A9 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 5817738F1E37A0F0004E28A9 /* Icon.png */; }; + 5817739C1E37A0F0004E28A9 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 581773901E37A0F0004E28A9 /* Icon@2x.png */; }; + 581773A61E37A2DB004E28A9 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5817739F1E37A2DB004E28A9 /* AudioToolbox.framework */; }; + 581773A71E37A2DB004E28A9 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581773A01E37A2DB004E28A9 /* AVFoundation.framework */; }; + 581773A81E37A2DB004E28A9 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581773A11E37A2DB004E28A9 /* CoreGraphics.framework */; }; + 581773A91E37A2DB004E28A9 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581773A21E37A2DB004E28A9 /* CoreMotion.framework */; }; + 581773AA1E37A2DB004E28A9 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581773A31E37A2DB004E28A9 /* OpenAL.framework */; }; + 581773AB1E37A2DB004E28A9 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581773A41E37A2DB004E28A9 /* OpenGLES.framework */; }; + 581773AC1E37A2DB004E28A9 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581773A51E37A2DB004E28A9 /* QuartzCore.framework */; }; + 581773AE1E37A7EF004E28A9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581773AD1E37A7EF004E28A9 /* UIKit.framework */; }; + C995F7171EAA5D0A003E34E1 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = C995F7161EAA5D0A003E34E1 /* assets */; }; + CE6CDCDC52B89D60EF851DB6 /* moe-main-interfaces.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A992AA605A8593389060E5E /* moe-main-interfaces.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1A992AA605A8593389060E5E /* moe-main-interfaces.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "moe-main-interfaces.m"; path = "../build/moe/main/ui-headers/moe-main-interfaces.m"; sourceTree = ""; }; + 1E152A74253836079FA1075F /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; + 581773851E37A0F0004E28A9 /* Default-375w-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-375w-667h@2x.png"; sourceTree = ""; }; + 581773861E37A0F0004E28A9 /* Default-414w-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-414w-736h@3x.png"; sourceTree = ""; }; + 581773871E37A0F0004E28A9 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 581773881E37A0F0004E28A9 /* Default-1024w-1366h@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-1024w-1366h@2x~ipad.png"; sourceTree = ""; }; + 581773891E37A0F0004E28A9 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 5817738A1E37A0F0004E28A9 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 5817738B1E37A0F0004E28A9 /* Default@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x~ipad.png"; sourceTree = ""; }; + 5817738C1E37A0F0004E28A9 /* Default~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default~ipad.png"; sourceTree = ""; }; + 5817738D1E37A0F0004E28A9 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 5817738E1E37A0F0004E28A9 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = ""; }; + 5817738F1E37A0F0004E28A9 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; + 581773901E37A0F0004E28A9 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = ""; }; + 5817739D1E37A10D004E28A9 /* custom.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = custom.xcconfig; sourceTree = ""; }; + 5817739F1E37A2DB004E28A9 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 581773A01E37A2DB004E28A9 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 581773A11E37A2DB004E28A9 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 581773A21E37A2DB004E28A9 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + 581773A31E37A2DB004E28A9 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 581773A41E37A2DB004E28A9 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 581773A51E37A2DB004E28A9 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 581773AD1E37A7EF004E28A9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 5863B87B1DA682C800E46B6A /* ios-moe-Test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ios-moe-Test.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5863B88E1DA682C800E46B6A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 58C6F5241DA66CB600309CB6 /* my-gdx-game.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "my-gdx-game.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 58C6F5381DA66CB600309CB6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8084D1F0A307440EC73CBFCA /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; + C995F7161EAA5D0A003E34E1 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../../core/assets; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5863B8781DA682C800E46B6A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 58C6F5211DA66CB600309CB6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 581773A61E37A2DB004E28A9 /* AudioToolbox.framework in Frameworks */, + 581773A71E37A2DB004E28A9 /* AVFoundation.framework in Frameworks */, + 581773A81E37A2DB004E28A9 /* CoreGraphics.framework in Frameworks */, + 581773A91E37A2DB004E28A9 /* CoreMotion.framework in Frameworks */, + 581773AA1E37A2DB004E28A9 /* OpenAL.framework in Frameworks */, + 581773AB1E37A2DB004E28A9 /* OpenGLES.framework in Frameworks */, + 581773AC1E37A2DB004E28A9 /* QuartzCore.framework in Frameworks */, + 581773AE1E37A7EF004E28A9 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 39C1466EC25B327A690D7AB8 /* Multi-OS Engine */ = { + isa = PBXGroup; + children = ( + 1A992AA605A8593389060E5E /* moe-main-interfaces.m */, + ); + name = "Multi-OS Engine"; + sourceTree = ""; + }; + 5817739E1E37A2DA004E28A9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 581773AD1E37A7EF004E28A9 /* UIKit.framework */, + 5817739F1E37A2DB004E28A9 /* AudioToolbox.framework */, + 581773A01E37A2DB004E28A9 /* AVFoundation.framework */, + 581773A11E37A2DB004E28A9 /* CoreGraphics.framework */, + 581773A21E37A2DB004E28A9 /* CoreMotion.framework */, + 581773A31E37A2DB004E28A9 /* OpenAL.framework */, + 581773A41E37A2DB004E28A9 /* OpenGLES.framework */, + 581773A51E37A2DB004E28A9 /* QuartzCore.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 5863B87C1DA682C800E46B6A /* ios-moe-Test */ = { + isa = PBXGroup; + children = ( + 5863B88E1DA682C800E46B6A /* Info.plist */, + 5863B87D1DA682C800E46B6A /* Supporting Files */, + ); + path = "ios-moe-Test"; + sourceTree = ""; + }; + 5863B87D1DA682C800E46B6A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 1E152A74253836079FA1075F /* main.cpp */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 58C6F51B1DA66CB600309CB6 = { + isa = PBXGroup; + children = ( + C995F7161EAA5D0A003E34E1 /* assets */, + 58C6F5261DA66CB600309CB6 /* ios-moe */, + 5863B87C1DA682C800E46B6A /* ios-moe-Test */, + 58C6F5251DA66CB600309CB6 /* Products */, + 5817739E1E37A2DA004E28A9 /* Frameworks */, + 39C1466EC25B327A690D7AB8 /* Multi-OS Engine */, + ); + sourceTree = ""; + }; + 58C6F5251DA66CB600309CB6 /* Products */ = { + isa = PBXGroup; + children = ( + 58C6F5241DA66CB600309CB6 /* my-gdx-game.app */, + 5863B87B1DA682C800E46B6A /* ios-moe-Test.app */, + ); + name = Products; + sourceTree = ""; + }; + 58C6F5261DA66CB600309CB6 /* ios-moe */ = { + isa = PBXGroup; + children = ( + 58C6F5381DA66CB600309CB6 /* Info.plist */, + 581773851E37A0F0004E28A9 /* Default-375w-667h@2x.png */, + 581773861E37A0F0004E28A9 /* Default-414w-736h@3x.png */, + 581773871E37A0F0004E28A9 /* Default-568h@2x.png */, + 581773881E37A0F0004E28A9 /* Default-1024w-1366h@2x~ipad.png */, + 581773891E37A0F0004E28A9 /* Default.png */, + 5817738A1E37A0F0004E28A9 /* Default@2x.png */, + 5817738B1E37A0F0004E28A9 /* Default@2x~ipad.png */, + 5817738C1E37A0F0004E28A9 /* Default~ipad.png */, + 5817738D1E37A0F0004E28A9 /* Icon-72.png */, + 5817738E1E37A0F0004E28A9 /* Icon-72@2x.png */, + 5817738F1E37A0F0004E28A9 /* Icon.png */, + 581773901E37A0F0004E28A9 /* Icon@2x.png */, + 5817739D1E37A10D004E28A9 /* custom.xcconfig */, + 58C6F5271DA66CB600309CB6 /* Supporting Files */, + ); + path = "ios-moe"; + sourceTree = ""; + }; + 58C6F5271DA66CB600309CB6 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 8084D1F0A307440EC73CBFCA /* main.cpp */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5863B87A1DA682C800E46B6A /* ios-moe-Test */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5863B88F1DA682C800E46B6A /* Build configuration list for PBXNativeTarget "ios-moe-Test" */; + buildPhases = ( + 1AE79C4EE6E5C399E50B1E3C /* Compile Sources (MOE) */, + 5863B8771DA682C800E46B6A /* Sources */, + 5863B8781DA682C800E46B6A /* Frameworks */, + 5863B8791DA682C800E46B6A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ios-moe-Test"; + productName = "ios-moe-Test"; + productReference = 5863B87B1DA682C800E46B6A /* ios-moe-Test.app */; + productType = "com.apple.product-type.application"; + }; + 58C6F5231DA66CB600309CB6 /* ios-moe */ = { + isa = PBXNativeTarget; + buildConfigurationList = 58C6F53B1DA66CB600309CB6 /* Build configuration list for PBXNativeTarget "ios-moe" */; + buildPhases = ( + F461487E379A46F550F0C10A /* Compile Sources (MOE) */, + 58C6F5201DA66CB600309CB6 /* Sources */, + 58C6F5211DA66CB600309CB6 /* Frameworks */, + 58C6F5221DA66CB600309CB6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ios-moe"; + productName = "ios-moe"; + productReference = 58C6F5241DA66CB600309CB6 /* my-gdx-game.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 58C6F51C1DA66CB600309CB6 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = x; + TargetAttributes = { + 5863B87A1DA682C800E46B6A = { + CreatedOnToolsVersion = 7.3.1; + }; + 58C6F5231DA66CB600309CB6 = { + CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 5VFDYR5GC3; + }; + }; + }; + buildConfigurationList = 58C6F51F1DA66CB600309CB6 /* Build configuration list for PBXProject "ios-moe" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 58C6F51B1DA66CB600309CB6; + productRefGroup = 58C6F5251DA66CB600309CB6 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 58C6F5231DA66CB600309CB6 /* ios-moe */, + 5863B87A1DA682C800E46B6A /* ios-moe-Test */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5863B8791DA682C800E46B6A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 58C6F5221DA66CB600309CB6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C995F7171EAA5D0A003E34E1 /* assets in Resources */, + 581773961E37A0F0004E28A9 /* Default@2x.png in Resources */, + 5817739C1E37A0F0004E28A9 /* Icon@2x.png in Resources */, + 581773911E37A0F0004E28A9 /* Default-375w-667h@2x.png in Resources */, + 5817739A1E37A0F0004E28A9 /* Icon-72@2x.png in Resources */, + 581773991E37A0F0004E28A9 /* Icon-72.png in Resources */, + 581773971E37A0F0004E28A9 /* Default@2x~ipad.png in Resources */, + 581773941E37A0F0004E28A9 /* Default-1024w-1366h@2x~ipad.png in Resources */, + 581773981E37A0F0004E28A9 /* Default~ipad.png in Resources */, + 581773921E37A0F0004E28A9 /* Default-414w-736h@3x.png in Resources */, + 5817739B1E37A0F0004E28A9 /* Icon.png in Resources */, + 581773931E37A0F0004E28A9 /* Default-568h@2x.png in Resources */, + 581773951E37A0F0004E28A9 /* Default.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1AE79C4EE6E5C399E50B1E3C /* Compile Sources (MOE) */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Compile Sources (MOE)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "set -e\n\nexport MOE_BUILD_SOURCE_SET=\"test\"\n\n# Check project directory\nif [ ! -d \"$MOE_PROJECT_DIR\" ]; then\n echo \"$0:$LINENO:1: error: 'MOE_PROJECT_DIR' doesn't point to a directory!\"; exit 1;\nfi\ncd \"$MOE_PROJECT_DIR\"\n\n# Export JAVA_HOME\nexport JAVA_HOME=$(/usr/libexec/java_home -v 1.8)\n\n# Utility function for finding the Gradle implementation\nfunction findGradle {\n CD=\"$PWD\"\n while [ \"$CD\" != \"\" ]; do\n echo \"Looking for gradlew in $CD\"\n if [ -x \"$CD/gradlew\" ]; then\n GRADLE_EXEC=$CD/gradlew\n return 0\n fi\n CD=\"${CD%/*}\"\n done\n\n echo \"Checking with 'which'\"\n GRADLE_EXEC=$(which 'gradle')\n\n if [ \"$GRADLE_EXEC\" = \"\" ]; then\n echo \"Failed to locate 'gradle' executable!\"\n exit 1\n fi\n}\n\n# Build project with Gradle\nif [ -z \"$MOE_GRADLE_EXTERNAL_BUILD\" ]; then\n findGradle\n \"$GRADLE_EXEC\" --no-daemon moeXcodeInternal -s\nfi\n\n# Check output directory\nif [ ! -d \"${MOE_PROJECT_BUILD_DIR}\" ]; then\n echo \"$0:$LINENO:1: error: 'MOE_PROJECT_BUILD_DIR' doesn't point to a directory!\"; exit 1;\nfi\n\n# Copy some resources\nmkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\ncp \"${MOE_PROJECT_BUILD_DIR}/moe/${MOE_BUILD_SOURCE_SET}/application.jar\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\ncp \"${MOE_PROJECT_BUILD_DIR}/moe/${MOE_BUILD_SOURCE_SET}/preregister.txt\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\nif [ \"${MOE_BUILD_SOURCE_SET}\" == \"test\" ]; then\n cp \"${MOE_PROJECT_BUILD_DIR}/moe/${MOE_BUILD_SOURCE_SET}/classlist.txt\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\nfi\n\n# Copy android CA certificates on demand\nif [ \"${MOE_COPY_ANDROID_CACERTS}\" == \"YES\" ]; then\n rm -rf \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/android_root/etc/security/cacerts\"\n mkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/android_root/etc/security/cacerts\"\n unzip \"${MOE_SDK_PATH}/sdk/moe-core-certificates.zip\" -d \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/android_root/etc/security/cacerts\"\nfi\n\n# Copy and sign MOE framework\nrsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \\\n \"${MOE_FRAMEWORK_PATH}/MOE.framework\" \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/\"\nif [ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" -a \"${CODE_SIGNING_REQUIRED}\" != \"NO\" -a \"${CODE_SIGNING_ALLOWED}\" != \"NO\" ]; then\n /usr/bin/codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY $OTHER_CODE_SIGN_FLAGS \\\n --preserve-metadata=identifier,entitlements \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MOE.framework\"\nfi\n"; + }; + F461487E379A46F550F0C10A /* Compile Sources (MOE) */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Compile Sources (MOE)"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "set -e\n\nexport MOE_BUILD_SOURCE_SET=\"main\"\n\n# Check project directory\nif [ ! -d \"$MOE_PROJECT_DIR\" ]; then\n echo \"$0:$LINENO:1: error: 'MOE_PROJECT_DIR' doesn't point to a directory!\"; exit 1;\nfi\ncd \"$MOE_PROJECT_DIR\"\n\n# Export JAVA_HOME\nexport JAVA_HOME=$(/usr/libexec/java_home -v 1.8)\n\n# Utility function for finding the Gradle implementation\nfunction findGradle {\n CD=\"$PWD\"\n while [ \"$CD\" != \"\" ]; do\n echo \"Looking for gradlew in $CD\"\n if [ -x \"$CD/gradlew\" ]; then\n GRADLE_EXEC=$CD/gradlew\n return 0\n fi\n CD=\"${CD%/*}\"\n done\n\n echo \"Checking with 'which'\"\n GRADLE_EXEC=$(which 'gradle')\n\n if [ \"$GRADLE_EXEC\" = \"\" ]; then\n echo \"Failed to locate 'gradle' executable!\"\n exit 1\n fi\n}\n\n# Build project with Gradle\nif [ -z \"$MOE_GRADLE_EXTERNAL_BUILD\" ]; then\n findGradle\n \"$GRADLE_EXEC\" --no-daemon moeXcodeInternal -s\nfi\n\n# Check output directory\nif [ ! -d \"${MOE_PROJECT_BUILD_DIR}\" ]; then\n echo \"$0:$LINENO:1: error: 'MOE_PROJECT_BUILD_DIR' doesn't point to a directory!\"; exit 1;\nfi\n\n# Copy some resources\nmkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\ncp \"${MOE_PROJECT_BUILD_DIR}/moe/${MOE_BUILD_SOURCE_SET}/application.jar\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\ncp \"${MOE_PROJECT_BUILD_DIR}/moe/${MOE_BUILD_SOURCE_SET}/preregister.txt\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\nif [ \"${MOE_BUILD_SOURCE_SET}\" == \"test\" ]; then\n cp \"${MOE_PROJECT_BUILD_DIR}/moe/${MOE_BUILD_SOURCE_SET}/classlist.txt\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/\"\nfi\n\n# Copy android CA certificates on demand\nif [ \"${MOE_COPY_ANDROID_CACERTS}\" == \"YES\" ]; then\n rm -rf \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/android_root/etc/security/cacerts\"\n mkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/android_root/etc/security/cacerts\"\n unzip \"${MOE_SDK_PATH}/sdk/moe-core-certificates.zip\" -d \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/android_root/etc/security/cacerts\"\nfi\n\n# Copy and sign MOE framework\nrsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \\\n \"${MOE_FRAMEWORK_PATH}/MOE.framework\" \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/\"\nif [ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" -a \"${CODE_SIGNING_REQUIRED}\" != \"NO\" -a \"${CODE_SIGNING_ALLOWED}\" != \"NO\" ]; then\n /usr/bin/codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY $OTHER_CODE_SIGN_FLAGS \\\n --preserve-metadata=identifier,entitlements \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MOE.framework\"\nfi\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5863B8771DA682C800E46B6A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 093EA0331288EEC18D3C79EC /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 58C6F5201DA66CB600309CB6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 16479D2CDCAC394B9A9722FE /* main.cpp in Sources */, + CE6CDCDC52B89D60EF851DB6 /* moe-main-interfaces.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 5863B8901DA682C800E46B6A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEAD_CODE_STRIPPING = NO; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "${MOE_FRAMEWORK_PATH}", + ); + INFOPLIST_FILE = "ios-moe-Test/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MOE_COPY_ANDROID_CACERTS = NO; + MOE_FRAMEWORK_PATH = "${MOE_SDK_PATH}/sdk/${PLATFORM_NAME}"; + MOE_OTHER_LDFLAGS = "${MOE_SECT_OAT} ${MOE_SECT_ART} ${MOE_SEGPROT} ${MOE_PAGEZERO} ${MOE_CUSTOM_OTHER_LDFLAGS} -lstdc++ -framework MOE"; + "MOE_PAGEZERO[sdk=iphoneos*]" = ""; + "MOE_PAGEZERO[sdk=iphonesimulator*]" = "-pagezero_size 4096"; + MOE_PROJECT_BUILD_DIR = "${MOE_PROJECT_DIR}/build"; + MOE_PROJECT_DIR = "${SRCROOT}/../"; + MOE_SDK_PATH = "${MOE_PROJECT_BUILD_DIR}/moe/sdk"; + MOE_SECT_ART = "-sectcreate __ARTDATA __artdata \"${MOE_PROJECT_BUILD_DIR}/moe/test/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.art\""; + MOE_SECT_OAT = "-sectcreate __OATDATA __oatdata \"${MOE_PROJECT_BUILD_DIR}/moe/test/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.oat\""; + "MOE_SEGPROT[sdk=iphoneos*]" = "-segprot __OATDATA rx rx -segprot __ARTDATA rw rw"; + "MOE_SEGPROT[sdk=iphonesimulator*]" = "-segprot __OATDATA rwx rx -segprot __ARTDATA rwx rw"; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = ( + "$(inherited)", + "${MOE_OTHER_LDFLAGS}", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mygdx.game; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_STYLE = "non-global"; + }; + name = Debug; + }; + 5863B8911DA682C800E46B6A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEAD_CODE_STRIPPING = NO; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "${MOE_FRAMEWORK_PATH}", + ); + INFOPLIST_FILE = "ios-moe-Test/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MOE_COPY_ANDROID_CACERTS = NO; + MOE_FRAMEWORK_PATH = "${MOE_SDK_PATH}/sdk/${PLATFORM_NAME}"; + MOE_OTHER_LDFLAGS = "${MOE_SECT_OAT} ${MOE_SECT_ART} ${MOE_SEGPROT} ${MOE_PAGEZERO} ${MOE_CUSTOM_OTHER_LDFLAGS} -lstdc++ -framework MOE"; + "MOE_PAGEZERO[sdk=iphoneos*]" = ""; + "MOE_PAGEZERO[sdk=iphonesimulator*]" = "-pagezero_size 4096"; + MOE_PROJECT_BUILD_DIR = "${MOE_PROJECT_DIR}/build"; + MOE_PROJECT_DIR = "${SRCROOT}/../"; + MOE_SDK_PATH = "${MOE_PROJECT_BUILD_DIR}/moe/sdk"; + MOE_SECT_ART = "-sectcreate __ARTDATA __artdata \"${MOE_PROJECT_BUILD_DIR}/moe/test/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.art\""; + MOE_SECT_OAT = "-sectcreate __OATDATA __oatdata \"${MOE_PROJECT_BUILD_DIR}/moe/test/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.oat\""; + "MOE_SEGPROT[sdk=iphoneos*]" = "-segprot __OATDATA rx rx -segprot __ARTDATA rw rw"; + "MOE_SEGPROT[sdk=iphonesimulator*]" = "-segprot __OATDATA rwx rx -segprot __ARTDATA rwx rw"; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "${MOE_OTHER_LDFLAGS}", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mygdx.game; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_STYLE = "non-global"; + }; + name = Release; + }; + 58C6F5391DA66CB600309CB6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MOE_VERSION = 1.3.6; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 58C6F53A1DA66CB600309CB6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MOE_VERSION = 1.3.6; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 58C6F53C1DA66CB600309CB6 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5817739D1E37A10D004E28A9 /* custom.xcconfig */; + buildSettings = { + DEAD_CODE_STRIPPING = NO; + DEVELOPMENT_TEAM = 5VFDYR5GC3; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "${MOE_FRAMEWORK_PATH}", + ); + INFOPLIST_FILE = "ios-moe/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MOE_COPY_ANDROID_CACERTS = NO; + MOE_FRAMEWORK_PATH = "${MOE_SDK_PATH}/sdk/${PLATFORM_NAME}"; + MOE_OTHER_LDFLAGS = "${MOE_SECT_OAT} ${MOE_SECT_ART} ${MOE_SEGPROT} ${MOE_PAGEZERO} ${MOE_CUSTOM_OTHER_LDFLAGS} -lstdc++ -framework MOE"; + "MOE_PAGEZERO[sdk=iphoneos*]" = ""; + "MOE_PAGEZERO[sdk=iphonesimulator*]" = "-pagezero_size 4096"; + MOE_PROJECT_BUILD_DIR = "${MOE_PROJECT_DIR}/build"; + MOE_PROJECT_DIR = "${SRCROOT}/../"; + MOE_SDK_PATH = "${MOE_PROJECT_BUILD_DIR}/moe/sdk"; + MOE_SECT_ART = "-sectcreate __ARTDATA __artdata \"${MOE_PROJECT_BUILD_DIR}/moe/main/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.art\""; + MOE_SECT_OAT = "-sectcreate __OATDATA __oatdata \"${MOE_PROJECT_BUILD_DIR}/moe/main/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.oat\""; + "MOE_SEGPROT[sdk=iphoneos*]" = "-segprot __OATDATA rx rx -segprot __ARTDATA rw rw"; + "MOE_SEGPROT[sdk=iphonesimulator*]" = "-segprot __OATDATA rwx rx -segprot __ARTDATA rwx rw"; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = ( + "$(inherited)", + "${MOE_OTHER_LDFLAGS}", + "$(LIBGDX_NATIVES)", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mygdx.game; + PRODUCT_NAME = "my-gdx-game"; + STRIP_STYLE = "non-global"; + }; + name = Debug; + }; + 58C6F53D1DA66CB600309CB6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5817739D1E37A10D004E28A9 /* custom.xcconfig */; + buildSettings = { + DEAD_CODE_STRIPPING = NO; + DEVELOPMENT_TEAM = 5VFDYR5GC3; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "${MOE_FRAMEWORK_PATH}", + ); + INFOPLIST_FILE = "ios-moe/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MOE_COPY_ANDROID_CACERTS = NO; + MOE_FRAMEWORK_PATH = "${MOE_SDK_PATH}/sdk/${PLATFORM_NAME}"; + MOE_OTHER_LDFLAGS = "${MOE_SECT_OAT} ${MOE_SECT_ART} ${MOE_SEGPROT} ${MOE_PAGEZERO} ${MOE_CUSTOM_OTHER_LDFLAGS} -lstdc++ -framework MOE"; + "MOE_PAGEZERO[sdk=iphoneos*]" = ""; + "MOE_PAGEZERO[sdk=iphonesimulator*]" = "-pagezero_size 4096"; + MOE_PROJECT_BUILD_DIR = "${MOE_PROJECT_DIR}/build"; + MOE_PROJECT_DIR = "${SRCROOT}/../"; + MOE_SDK_PATH = "${MOE_PROJECT_BUILD_DIR}/moe/sdk"; + MOE_SECT_ART = "-sectcreate __ARTDATA __artdata \"${MOE_PROJECT_BUILD_DIR}/moe/main/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.art\""; + MOE_SECT_OAT = "-sectcreate __OATDATA __oatdata \"${MOE_PROJECT_BUILD_DIR}/moe/main/xcode/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/${arch}.oat\""; + "MOE_SEGPROT[sdk=iphoneos*]" = "-segprot __OATDATA rx rx -segprot __ARTDATA rw rw"; + "MOE_SEGPROT[sdk=iphonesimulator*]" = "-segprot __OATDATA rwx rx -segprot __ARTDATA rwx rw"; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "${MOE_OTHER_LDFLAGS}", + "$(LIBGDX_NATIVES)", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mygdx.game; + PRODUCT_NAME = "my-gdx-game"; + STRIP_STYLE = "non-global"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5863B88F1DA682C800E46B6A /* Build configuration list for PBXNativeTarget "ios-moe-Test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5863B8901DA682C800E46B6A /* Debug */, + 5863B8911DA682C800E46B6A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 58C6F51F1DA66CB600309CB6 /* Build configuration list for PBXProject "ios-moe" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 58C6F5391DA66CB600309CB6 /* Debug */, + 58C6F53A1DA66CB600309CB6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 58C6F53B1DA66CB600309CB6 /* Build configuration list for PBXNativeTarget "ios-moe" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 58C6F53C1DA66CB600309CB6 /* Debug */, + 58C6F53D1DA66CB600309CB6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 58C6F51C1DA66CB600309CB6 /* Project object */; +} diff --git a/ios-moe/xcode/ios-moe.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios-moe/xcode/ios-moe.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/ios-moe/xcode/ios-moe.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios-moe/xcode/ios-moe.xcodeproj/project.xcworkspace/xcuserdata/Relintai.xcuserdatad/UserInterfaceState.xcuserstate b/ios-moe/xcode/ios-moe.xcodeproj/project.xcworkspace/xcuserdata/Relintai.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..8c5aa4f5 Binary files /dev/null and b/ios-moe/xcode/ios-moe.xcodeproj/project.xcworkspace/xcuserdata/Relintai.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios-moe/xcode/ios-moe.xcodeproj/xcuserdata/Relintai.xcuserdatad/xcschemes/xcschememanagement.plist b/ios-moe/xcode/ios-moe.xcodeproj/xcuserdata/Relintai.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..1ef0fb5f --- /dev/null +++ b/ios-moe/xcode/ios-moe.xcodeproj/xcuserdata/Relintai.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,19 @@ + + + + + SchemeUserState + + ios-moe-Test.xcscheme + + orderHint + 1 + + ios-moe.xcscheme + + orderHint + 0 + + + + diff --git a/ios-moe/xcode/ios-moe/Default-1024w-1366h@2x~ipad.png b/ios-moe/xcode/ios-moe/Default-1024w-1366h@2x~ipad.png new file mode 100644 index 00000000..b175eaab Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default-1024w-1366h@2x~ipad.png differ diff --git a/ios-moe/xcode/ios-moe/Default-375w-667h@2x.png b/ios-moe/xcode/ios-moe/Default-375w-667h@2x.png new file mode 100644 index 00000000..f213ce60 Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default-375w-667h@2x.png differ diff --git a/ios-moe/xcode/ios-moe/Default-414w-736h@3x.png b/ios-moe/xcode/ios-moe/Default-414w-736h@3x.png new file mode 100644 index 00000000..685ba51f Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default-414w-736h@3x.png differ diff --git a/ios-moe/xcode/ios-moe/Default-568h@2x.png b/ios-moe/xcode/ios-moe/Default-568h@2x.png new file mode 100644 index 00000000..101752fe Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default-568h@2x.png differ diff --git a/ios-moe/xcode/ios-moe/Default.png b/ios-moe/xcode/ios-moe/Default.png new file mode 100644 index 00000000..f1a5582a Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default.png differ diff --git a/ios-moe/xcode/ios-moe/Default@2x.png b/ios-moe/xcode/ios-moe/Default@2x.png new file mode 100644 index 00000000..ca32f62f Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default@2x.png differ diff --git a/ios-moe/xcode/ios-moe/Default@2x~ipad.png b/ios-moe/xcode/ios-moe/Default@2x~ipad.png new file mode 100644 index 00000000..bb77ef07 Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default@2x~ipad.png differ diff --git a/ios-moe/xcode/ios-moe/Default~ipad.png b/ios-moe/xcode/ios-moe/Default~ipad.png new file mode 100644 index 00000000..855e4f2a Binary files /dev/null and b/ios-moe/xcode/ios-moe/Default~ipad.png differ diff --git a/ios-moe/xcode/ios-moe/Icon-72.png b/ios-moe/xcode/ios-moe/Icon-72.png new file mode 100644 index 00000000..8cc57591 Binary files /dev/null and b/ios-moe/xcode/ios-moe/Icon-72.png differ diff --git a/ios-moe/xcode/ios-moe/Icon-72@2x.png b/ios-moe/xcode/ios-moe/Icon-72@2x.png new file mode 100644 index 00000000..ec5e3803 Binary files /dev/null and b/ios-moe/xcode/ios-moe/Icon-72@2x.png differ diff --git a/ios-moe/xcode/ios-moe/Icon.png b/ios-moe/xcode/ios-moe/Icon.png new file mode 100644 index 00000000..7f4bf363 Binary files /dev/null and b/ios-moe/xcode/ios-moe/Icon.png differ diff --git a/ios-moe/xcode/ios-moe/Icon@2x.png b/ios-moe/xcode/ios-moe/Icon@2x.png new file mode 100644 index 00000000..eddc17c5 Binary files /dev/null and b/ios-moe/xcode/ios-moe/Icon@2x.png differ diff --git a/ios-moe/xcode/ios-moe/Info.plist b/ios-moe/xcode/ios-moe/Info.plist new file mode 100644 index 00000000..7e4ba2de --- /dev/null +++ b/ios-moe/xcode/ios-moe/Info.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + MOE.Main.Class + com.mygdx.game.IOSMoeLauncher + UIApplicationExitsOnSuspend + + UIRequiredDeviceCapabilities + + armv7 + + UIRequiresFullScreen + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/ios-moe/xcode/ios-moe/custom.xcconfig b/ios-moe/xcode/ios-moe/custom.xcconfig new file mode 100644 index 00000000..d4f2199f --- /dev/null +++ b/ios-moe/xcode/ios-moe/custom.xcconfig @@ -0,0 +1 @@ +LIBGDX_NATIVES = -force_load ${SRCROOT}/native/ios/libObjectAL.a -force_load ${SRCROOT}/native/ios/libgdx.a \ No newline at end of file diff --git a/ios-moe/xcode/ios-moe/main.cpp b/ios-moe/xcode/ios-moe/main.cpp new file mode 100644 index 00000000..fef543a1 --- /dev/null +++ b/ios-moe/xcode/ios-moe/main.cpp @@ -0,0 +1,5 @@ +#include + +int main(int argc, char *argv[]) { + return moevm(argc, argv); +} diff --git a/ios-moe/xcode/native/ios/libObjectAL.a b/ios-moe/xcode/native/ios/libObjectAL.a new file mode 100644 index 00000000..446d69ea Binary files /dev/null and b/ios-moe/xcode/native/ios/libObjectAL.a differ diff --git a/ios-moe/xcode/native/ios/libgdx.a b/ios-moe/xcode/native/ios/libgdx.a new file mode 100644 index 00000000..d90f5089 Binary files /dev/null and b/ios-moe/xcode/native/ios/libgdx.a differ diff --git a/ios/.classpath b/ios/.classpath new file mode 100644 index 00000000..343b0cce --- /dev/null +++ b/ios/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ios/.project b/ios/.project new file mode 100644 index 00000000..78750bb1 --- /dev/null +++ b/ios/.project @@ -0,0 +1,24 @@ + + + mtg-forge-gradle-ios + Project my-gdx-game-ios created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.robovm.eclipse.RoboVMNature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/ios/.settings/org.eclipse.buildship.core.prefs b/ios/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..80193782 --- /dev/null +++ b/ios/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Sat Sep 30 20:07:13 CEST 2017 +connection.project.dir=.. diff --git a/ios/.settings/org.eclipse.jdt.core.prefs b/ios/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..64cef502 --- /dev/null +++ b/ios/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/ios/Info.plist.xml b/ios/Info.plist.xml new file mode 100644 index 00000000..9842ae29 --- /dev/null +++ b/ios/Info.plist.xml @@ -0,0 +1,50 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${app.name} + CFBundleExecutable + ${app.executable} + CFBundleIdentifier + ${app.id} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${app.name} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${app.version} + CFBundleSignature + ???? + CFBundleVersion + ${app.build} + LSRequiresIPhoneOS + + UIViewControllerBasedStatusBarAppearance + + UIStatusBarHidden + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + opengles-2 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CFBundleIconName + AppIcon + + diff --git a/ios/bin/.gitignore b/ios/bin/.gitignore new file mode 100644 index 00000000..c2d9872a --- /dev/null +++ b/ios/bin/.gitignore @@ -0,0 +1 @@ +/com/ diff --git a/ios/build.gradle b/ios/build.gradle new file mode 100644 index 00000000..4a3f9263 --- /dev/null +++ b/ios/build.gradle @@ -0,0 +1,22 @@ +sourceSets.main.java.srcDirs = [ "src/" ] + +sourceCompatibility = '1.7' +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + +ext { + mainClassName = "com.mygdx.game.IOSLauncher" +} + +launchIPhoneSimulator.dependsOn build +launchIPadSimulator.dependsOn build +launchIOSDevice.dependsOn build +createIPA.dependsOn build + +robovm { + archs = "thumbv7:arm64" +} + +eclipse.project { + name = appName + "-ios" + natures 'org.robovm.eclipse.RoboVMNature' +} \ No newline at end of file diff --git a/ios/data/Default-1024w-1366h@2x~ipad.png b/ios/data/Default-1024w-1366h@2x~ipad.png new file mode 100644 index 00000000..b175eaab Binary files /dev/null and b/ios/data/Default-1024w-1366h@2x~ipad.png differ diff --git a/ios/data/Default-375w-667h@2x.png b/ios/data/Default-375w-667h@2x.png new file mode 100644 index 00000000..f213ce60 Binary files /dev/null and b/ios/data/Default-375w-667h@2x.png differ diff --git a/ios/data/Default-414w-736h@3x.png b/ios/data/Default-414w-736h@3x.png new file mode 100644 index 00000000..685ba51f Binary files /dev/null and b/ios/data/Default-414w-736h@3x.png differ diff --git a/ios/data/Default-568h@2x.png b/ios/data/Default-568h@2x.png new file mode 100644 index 00000000..101752fe Binary files /dev/null and b/ios/data/Default-568h@2x.png differ diff --git a/ios/data/Default.png b/ios/data/Default.png new file mode 100644 index 00000000..f1a5582a Binary files /dev/null and b/ios/data/Default.png differ diff --git a/ios/data/Default@2x.png b/ios/data/Default@2x.png new file mode 100644 index 00000000..ca32f62f Binary files /dev/null and b/ios/data/Default@2x.png differ diff --git a/ios/data/Default@2x~ipad.png b/ios/data/Default@2x~ipad.png new file mode 100644 index 00000000..bb77ef07 Binary files /dev/null and b/ios/data/Default@2x~ipad.png differ diff --git a/ios/data/Default~ipad.png b/ios/data/Default~ipad.png new file mode 100644 index 00000000..855e4f2a Binary files /dev/null and b/ios/data/Default~ipad.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/Contents.json b/ios/data/Media.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..9ed19e12 --- /dev/null +++ b/ios/data/Media.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,116 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "iphone-notification-icon-20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "iphone-notification-icon-20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "iphone-spotlight-settings-icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "iphone-spotlight-settings-icon-29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "iphone-spotlight-icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "iphone-spotlight-icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "iphone-app-icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "iphone-app-icon-60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "ipad-notifications-icon-20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "ipad-notifications-icon-20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "ipad-settings-icon-29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "ipad-settings-icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "ipad-spotlight-icon-40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "ipad-spotlight-icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "ipad-app-icon-76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "ipad-app-icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "ipad-pro-app-icon-83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "app-store-icon-1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/app-store-icon-1024@1x.png b/ios/data/Media.xcassets/AppIcon.appiconset/app-store-icon-1024@1x.png new file mode 100644 index 00000000..6beb6cab Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/app-store-icon-1024@1x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-app-icon-76@1x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-app-icon-76@1x.png new file mode 100644 index 00000000..867007bc Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-app-icon-76@1x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-app-icon-76@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-app-icon-76@2x.png new file mode 100644 index 00000000..84c2a18d Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-app-icon-76@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-notifications-icon-20@1x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-notifications-icon-20@1x.png new file mode 100644 index 00000000..834a7e2d Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-notifications-icon-20@1x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-notifications-icon-20@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-notifications-icon-20@2x.png new file mode 100644 index 00000000..0c38d9c2 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-notifications-icon-20@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-pro-app-icon-83.5@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-pro-app-icon-83.5@2x.png new file mode 100644 index 00000000..46af0027 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-pro-app-icon-83.5@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-settings-icon-29@1x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-settings-icon-29@1x.png new file mode 100644 index 00000000..bad003db Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-settings-icon-29@1x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-settings-icon-29@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-settings-icon-29@2x.png new file mode 100644 index 00000000..9b4e0cad Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-settings-icon-29@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-spotlight-icon-40@1x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-spotlight-icon-40@1x.png new file mode 100644 index 00000000..0c38d9c2 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-spotlight-icon-40@1x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/ipad-spotlight-icon-40@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-spotlight-icon-40@2x.png new file mode 100644 index 00000000..26d89ca5 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/ipad-spotlight-icon-40@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-app-icon-60@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-app-icon-60@2x.png new file mode 100644 index 00000000..53aedbd1 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-app-icon-60@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-app-icon-60@3x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-app-icon-60@3x.png new file mode 100644 index 00000000..ff08abd5 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-app-icon-60@3x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-notification-icon-20@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-notification-icon-20@2x.png new file mode 100644 index 00000000..0c38d9c2 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-notification-icon-20@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-notification-icon-20@3x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-notification-icon-20@3x.png new file mode 100644 index 00000000..b366f620 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-notification-icon-20@3x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-icon-40@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-icon-40@2x.png new file mode 100644 index 00000000..26d89ca5 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-icon-40@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-icon-40@3x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-icon-40@3x.png new file mode 100644 index 00000000..53aedbd1 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-icon-40@3x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-settings-icon-29@2x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-settings-icon-29@2x.png new file mode 100644 index 00000000..9b4e0cad Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-settings-icon-29@2x.png differ diff --git a/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-settings-icon-29@3x.png b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-settings-icon-29@3x.png new file mode 100644 index 00000000..975d3b35 Binary files /dev/null and b/ios/data/Media.xcassets/AppIcon.appiconset/iphone-spotlight-settings-icon-29@3x.png differ diff --git a/ios/data/Media.xcassets/Contents.json b/ios/data/Media.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/ios/data/Media.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/robovm.properties b/ios/robovm.properties new file mode 100644 index 00000000..1a06664b --- /dev/null +++ b/ios/robovm.properties @@ -0,0 +1,6 @@ +app.version=1.0 +app.id=com.mygdx.game +app.mainclass=com.mygdx.game.IOSLauncher +app.executable=IOSLauncher +app.build=1 +app.name=my-gdx-game diff --git a/ios/robovm.xml b/ios/robovm.xml new file mode 100644 index 00000000..ebce6c1b --- /dev/null +++ b/ios/robovm.xml @@ -0,0 +1,47 @@ + + ${app.executable} + ${app.mainclass} + ios + thumbv7 + ios + Info.plist.xml + + + ../core/assets + + ** + + true + + + data + + + + com.badlogic.gdx.scenes.scene2d.ui.* + com.badlogic.gdx.graphics.g3d.particles.** + com.android.okhttp.HttpHandler + com.android.okhttp.HttpsHandler + com.android.org.conscrypt.** + com.android.org.bouncycastle.jce.provider.BouncyCastleProvider + com.android.org.bouncycastle.jcajce.provider.keystore.BC$Mappings + com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi + com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std + com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi + com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL + org.apache.harmony.security.provider.cert.DRLCertFactory + org.apache.harmony.security.provider.crypto.CryptoProvider + + + z + + + UIKit + OpenGLES + QuartzCore + CoreGraphics + OpenAL + AudioToolbox + AVFoundation + + diff --git a/ios/src/com/mygdx/game/IOSLauncher.java b/ios/src/com/mygdx/game/IOSLauncher.java new file mode 100644 index 00000000..583745ad --- /dev/null +++ b/ios/src/com/mygdx/game/IOSLauncher.java @@ -0,0 +1,22 @@ +package com.mygdx.game; + +import org.robovm.apple.foundation.NSAutoreleasePool; +import org.robovm.apple.uikit.UIApplication; + +import com.badlogic.gdx.backends.iosrobovm.IOSApplication; +import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration; +import com.mygdx.game.MyGdxGame; + +public class IOSLauncher extends IOSApplication.Delegate { + @Override + protected IOSApplication createApplication() { + IOSApplicationConfiguration config = new IOSApplicationConfiguration(); + return new IOSApplication(new MyGdxGame(), config); + } + + public static void main(String[] argv) { + NSAutoreleasePool pool = new NSAutoreleasePool(); + UIApplication.main(argv, null, IOSLauncher.class); + pool.close(); + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..3acebe0b --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include 'forge-gui', 'forge-gui-desktop', 'forge-gui-ios', 'forge-core', 'ios-moe', 'forge-gui-mobile', 'forge-gui-ios' , 'forge-ai' \ No newline at end of file