mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
Updated Phyrexian Mana
+ “A Phyrexian mana symbol represents a cost that can be paid either with *one mana of its color* or by paying 2 life”. These symbols are mono colored, as such I have made them so. + Added test cases for phyrexian mana symbols
This commit is contained in:
parent
6138af0ffb
commit
f2972c5b8e
2 changed files with 151 additions and 6 deletions
|
@ -644,6 +644,151 @@ public class ManaSymbolTest {
|
|||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void shouldCreateWPhyrexianMana() {
|
||||
// given
|
||||
|
||||
// when
|
||||
ManaSymbol phyW = ManaSymbol.PHYREXIAN_W;
|
||||
|
||||
// then
|
||||
assertEquals("{W/P}", phyW.toString());
|
||||
assertFalse(phyW.isGreen());
|
||||
assertFalse(phyW.isBlue());
|
||||
assertFalse(phyW.isRed());
|
||||
assertFalse(phyW.isBlack());
|
||||
assertFalse(phyW.isPrimary());
|
||||
assertFalse(phyW.isGeneric());
|
||||
assertFalse(phyW.isColorless());
|
||||
assertFalse(phyW.isHybrid());
|
||||
assertFalse(phyW.isSnow());
|
||||
|
||||
assertTrue(phyW.isWhite());
|
||||
assertTrue(phyW.isPhyrexian());
|
||||
assertTrue(phyW.isColored());
|
||||
assertTrue(phyW.isMonocolored());
|
||||
|
||||
assertEquals(ManaSymbol.W, phyW.getManaSymbol1());
|
||||
assertEquals(null, phyW.getManaSymbol2());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void shouldCreateGPhyrexianMana() {
|
||||
// given
|
||||
|
||||
// when
|
||||
ManaSymbol phyG = ManaSymbol.PHYREXIAN_G;
|
||||
|
||||
// then
|
||||
assertEquals("{G/P}", phyG.toString());
|
||||
assertFalse(phyG.isWhite());
|
||||
assertFalse(phyG.isBlue());
|
||||
assertFalse(phyG.isRed());
|
||||
assertFalse(phyG.isBlack());
|
||||
assertFalse(phyG.isPrimary());
|
||||
assertFalse(phyG.isGeneric());
|
||||
assertFalse(phyG.isColorless());
|
||||
assertFalse(phyG.isHybrid());
|
||||
assertFalse(phyG.isSnow());
|
||||
|
||||
assertTrue(phyG.isGreen());
|
||||
assertTrue(phyG.isPhyrexian());
|
||||
assertTrue(phyG.isColored());
|
||||
assertTrue(phyG.isMonocolored());
|
||||
|
||||
assertEquals(ManaSymbol.G, phyG.getManaSymbol1());
|
||||
assertEquals(null, phyG.getManaSymbol2());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void shouldCreateRPhyrexianMana() {
|
||||
// given
|
||||
|
||||
// when
|
||||
ManaSymbol phyR = ManaSymbol.PHYREXIAN_R;
|
||||
|
||||
// then
|
||||
assertEquals("{R/P}", phyR.toString());
|
||||
assertFalse(phyR.isGreen());
|
||||
assertFalse(phyR.isWhite());
|
||||
assertFalse(phyR.isBlue());
|
||||
assertFalse(phyR.isBlack());
|
||||
assertFalse(phyR.isPrimary());
|
||||
assertFalse(phyR.isGeneric());
|
||||
assertFalse(phyR.isColorless());
|
||||
assertFalse(phyR.isHybrid());
|
||||
assertFalse(phyR.isSnow());
|
||||
|
||||
assertTrue(phyR.isRed());
|
||||
assertTrue(phyR.isPhyrexian());
|
||||
assertTrue(phyR.isColored());
|
||||
assertTrue(phyR.isMonocolored());
|
||||
|
||||
assertEquals(ManaSymbol.R, phyR.getManaSymbol1());
|
||||
assertEquals(null, phyR.getManaSymbol2());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void shouldCreateBPhyrexianMana() {
|
||||
// given
|
||||
|
||||
// when
|
||||
ManaSymbol phyB = ManaSymbol.PHYREXIAN_B;
|
||||
|
||||
// then
|
||||
assertEquals("{B/P}", phyB.toString());
|
||||
assertFalse(phyB.isRed());
|
||||
assertFalse(phyB.isGreen());
|
||||
assertFalse(phyB.isWhite());
|
||||
assertFalse(phyB.isBlue());
|
||||
assertFalse(phyB.isPrimary());
|
||||
assertFalse(phyB.isGeneric());
|
||||
assertFalse(phyB.isColorless());
|
||||
assertFalse(phyB.isHybrid());
|
||||
assertFalse(phyB.isSnow());
|
||||
|
||||
assertTrue(phyB.isBlack());
|
||||
assertTrue(phyB.isPhyrexian());
|
||||
assertTrue(phyB.isColored());
|
||||
assertTrue(phyB.isMonocolored());
|
||||
|
||||
assertEquals(ManaSymbol.B, phyB.getManaSymbol1());
|
||||
assertEquals(null, phyB.getManaSymbol2());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void shouldCreateUPhyrexianMana() {
|
||||
// given
|
||||
|
||||
// when
|
||||
ManaSymbol phyU = ManaSymbol.PHYREXIAN_U;
|
||||
|
||||
// then
|
||||
assertEquals("{U/P}", phyU.toString());
|
||||
assertFalse(phyU.isBlack());
|
||||
assertFalse(phyU.isRed());
|
||||
assertFalse(phyU.isGreen());
|
||||
assertFalse(phyU.isWhite());
|
||||
assertFalse(phyU.isPrimary());
|
||||
assertFalse(phyU.isGeneric());
|
||||
assertFalse(phyU.isColorless());
|
||||
assertFalse(phyU.isHybrid());
|
||||
assertFalse(phyU.isSnow());
|
||||
|
||||
assertTrue(phyU.isBlue());
|
||||
assertTrue(phyU.isPhyrexian());
|
||||
assertTrue(phyU.isColored());
|
||||
assertTrue(phyU.isMonocolored());
|
||||
|
||||
assertEquals(ManaSymbol.U, phyU.getManaSymbol1());
|
||||
assertEquals(null, phyU.getManaSymbol2());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void shouldCreateSnowMana() {
|
||||
// given
|
||||
|
@ -670,6 +815,5 @@ public class ManaSymbolTest {
|
|||
|
||||
assertEquals(null, snow.getManaSymbol1());
|
||||
assertEquals(null, snow.getManaSymbol2());
|
||||
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package mage;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Enum representing the mana symbols.
|
||||
* <p>
|
||||
|
@ -77,11 +78,11 @@ public enum ManaSymbol {
|
|||
MONOCOLORED_HYBRID_B("{2/B}", B, Type.HYBRID, Type.MONOCOLORED, Type.COLORED),
|
||||
MONOCOLORED_HYBRID_R("{2/R}", R, Type.HYBRID, Type.MONOCOLORED, Type.COLORED),
|
||||
MONOCOLORED_HYBRID_G("{2/G}", G, Type.HYBRID, Type.MONOCOLORED, Type.COLORED),
|
||||
PHYREXIAN_W("{W/P}", W, Type.PHYREXIAN, Type.COLORED),
|
||||
PHYREXIAN_G("{G/P}", G, Type.PHYREXIAN, Type.COLORED),
|
||||
PHYREXIAN_R("{R/P}", R, Type.PHYREXIAN, Type.COLORED),
|
||||
PHYREXIAN_B("{B/P}", B, Type.PHYREXIAN, Type.COLORED),
|
||||
PHYREXIAN_U("{U/P}", U, Type.PHYREXIAN, Type.COLORED),
|
||||
PHYREXIAN_W("{W/P}", W, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED),
|
||||
PHYREXIAN_G("{G/P}", G, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED),
|
||||
PHYREXIAN_R("{R/P}", R, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED),
|
||||
PHYREXIAN_B("{B/P}", B, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED),
|
||||
PHYREXIAN_U("{U/P}", U, Type.PHYREXIAN, Type.COLORED, Type.MONOCOLORED),
|
||||
SNOW("{S}", Type.SNOW);
|
||||
|
||||
private enum Type {
|
||||
|
|
Loading…
Add table
Reference in a new issue