MVC organization: Moved instantiation of AI from FView to FModel.

This commit is contained in:
Doublestrike
2012-01-22 07:43:38 +00:00
parent a2dbe6ff4a
commit a149f9b32d
3 changed files with 20 additions and 15 deletions

View File

@@ -26,8 +26,12 @@ import java.io.PrintStream;
import net.slightlymagic.braids.util.progress_monitor.BraidsProgressMonitor;
import arcane.util.MultiplexOutputStream;
import forge.AllZone;
import forge.ComputerAIGeneral;
import forge.ComputerAIInput;
import forge.Constant;
import forge.HttpUtil;
import forge.gui.input.InputControl;
import forge.properties.ForgePreferences;
import forge.properties.ForgeProps;
import forge.properties.NewConstants;
@@ -88,6 +92,10 @@ public class FModel {
throw new RuntimeException(exn);
}
// Instantiate AI
AllZone.setInputControl(new InputControl(FModel.this));
AllZone.getInputControl().setComputer(new ComputerAIInput(new ComputerAIGeneral()));
// TODO these should be set along with others all at the same time, not
// here
Constant.Runtime.MILL[0] = this.preferences.isMillingLossCondition();