compare enum with ==

master
melvin 2012-09-28 16:16:18 +08:00
parent 3cbb61cebd
commit 0358cde92f
1 changed files with 5 additions and 5 deletions

View File

@ -172,15 +172,15 @@ public class CardDefinitions {
} }
public static MagicCardDefinition getBasicLand(final MagicColor color) { public static MagicCardDefinition getBasicLand(final MagicColor color) {
if (MagicColor.Black.equals(color)) { if (MagicColor.Black == color) {
return getCard("Swamp"); return getCard("Swamp");
} else if (MagicColor.Blue.equals(color)) { } else if (MagicColor.Blue == color) {
return getCard("Island"); return getCard("Island");
} else if (MagicColor.Green.equals(color)) { } else if (MagicColor.Green == color) {
return getCard("Forest"); return getCard("Forest");
} else if (MagicColor.Red.equals(color)) { } else if (MagicColor.Red == color) {
return getCard("Mountain"); return getCard("Mountain");
} else if (MagicColor.White.equals(color)) { } else if (MagicColor.White == color) {
return getCard("Plains"); return getCard("Plains");
} }
throw new RuntimeException("No matching basic land for MagicColor " + color); throw new RuntimeException("No matching basic land for MagicColor " + color);