From a2166d435ff6cd4bb22f0e00ff9f9cdff9b967d2 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 09:20:01 +0000 Subject: [PATCH] "Human" -> Constant.Player.Human; "Computer" -> Constant.Player.Computer --- src/forge/CardFactory.java | 2 +- src/forge/CardFactoryUtil.java | 2 +- src/forge/CardFactory_Instants.java | 4 ++-- src/forge/CardFactory_Lands.java | 2 +- src/forge/ComputerAI_General.java | 4 ++-- src/forge/ComputerUtil.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 50035870bf6..132313fea5c 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -3962,7 +3962,7 @@ public class CardFactory implements NewConstants { if (Destination.equals("Hand")) AllZone.Computer_Hand.add(c); //move to hand if (Destination.equals("TopOfLibrary")) AllZone.Computer_Library.add(c, 0); //move to top of library if (Destination.equals("ThirdFromTopOfLibrary")) AllZone.Computer_Library.add(c, 2); //move to third from top of library - if (Destination.equals("Battlefield")) AllZone.getZone(Constant.Zone.Play, "Computer").add(c); //move to battlezone + if (Destination.equals("Battlefield")) AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer).add(c); //move to battlezone if (!Targets.startsWith("Card") && !Destination.equals("Battlefield")) { CardList l = new CardList(); diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index 1467f3ae5f5..53fc45051d3 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -1008,7 +1008,7 @@ public class CardFactoryUtil { @Override public boolean canPlayAI() { - PlayerLife compLife = AllZone.GameAction.getPlayerLife("Computer"); + PlayerLife compLife = AllZone.GameAction.getPlayerLife(Constant.Player.Computer); int life = compLife.getLife(); return (life > (loss + 2)); diff --git a/src/forge/CardFactory_Instants.java b/src/forge/CardFactory_Instants.java index 055fe43d764..2a60cf6ca2c 100644 --- a/src/forge/CardFactory_Instants.java +++ b/src/forge/CardFactory_Instants.java @@ -2802,7 +2802,7 @@ public class CardFactory_Instants { @Override public boolean canPlayAI() { - PlayerLife compLife = AllZone.GameAction.getPlayerLife("Computer"); + PlayerLife compLife = AllZone.GameAction.getPlayerLife(Constant.Player.Computer); int life = compLife.getLife(); if(4 < AllZone.Phase.getTurn() && AllZone.Computer_Library.size() > 0 && life >= 4) return true; else return false; @@ -3377,7 +3377,7 @@ public class CardFactory_Instants { } }// if choice yes } // player equals human - else if(player.equals("Computer") && lands.size() > 0) { + else if(player.equals(Constant.Player.Computer) && lands.size() > 0) { Card card = lands.get(0); lib.remove(card); // hand.add(card); diff --git a/src/forge/CardFactory_Lands.java b/src/forge/CardFactory_Lands.java index 6bbf207e4be..55d6d503eea 100644 --- a/src/forge/CardFactory_Lands.java +++ b/src/forge/CardFactory_Lands.java @@ -197,7 +197,7 @@ class CardFactory_Lands { } else { CardList creature = new CardList(); - PlayerZone zone = AllZone.getZone(Constant.Zone.Play, "Computer"); + PlayerZone zone = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer); if(zone != null) { creature.addAll(zone.getCards()); creature = creature.getType("Creature"); diff --git a/src/forge/ComputerAI_General.java b/src/forge/ComputerAI_General.java index 69d668a6a0a..aaee62c7762 100644 --- a/src/forge/ComputerAI_General.java +++ b/src/forge/ComputerAI_General.java @@ -176,12 +176,12 @@ public class ComputerAI_General implements Computer { if(c.isLand()) return false; CardList Vengevines = new CardList(); - Vengevines.addAll(AllZone.getZone(Constant.Zone.Graveyard, "Computer").getCards()); + Vengevines.addAll(AllZone.getZone(Constant.Zone.Graveyard, Constant.Player.Computer).getCards()); Vengevines = Vengevines.getName("Vengevine"); if(Vengevines.size() > 0) { CardList Creatures = new CardList(); CardList Creatures2 = new CardList(); - Creatures.addAll(AllZone.getZone(Constant.Zone.Hand, "Computer").getCards()); + Creatures.addAll(AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer).getCards()); for(int i = 0; i < Creatures.size(); i++) { if(Creatures.get(i).getType().contains("Creature") && CardUtil.getConvertedManaCost(Creatures.get(i).getManaCost()) <= 3) { Creatures2.add(Creatures.get(i)); diff --git a/src/forge/ComputerUtil.java b/src/forge/ComputerUtil.java index 177ffdf3639..41889c45c90 100644 --- a/src/forge/ComputerUtil.java +++ b/src/forge/ComputerUtil.java @@ -535,7 +535,7 @@ public class ComputerUtil } while(!landList.isEmpty() && (AllZone.GameInfo.computerNumberLandPlaysLeft() > 0 || - CardFactoryUtil.getCards("Fastbond", "Computer").size() > 0)){ + CardFactoryUtil.getCards("Fastbond", Constant.Player.Computer).size() > 0)){ // play as many lands as you can int ix = 0; while (landList.get(ix).isReflectedLand() && (ix+1 < landList.size())) {