net.sf.magicproject.test
Class IsTested

java.lang.Object
  extended by net.sf.magicproject.test.Test
      extended by net.sf.magicproject.test.TestObject
          extended by net.sf.magicproject.test.TestCard
              extended by net.sf.magicproject.test.IsTested

public class IsTested
extends TestCard

Since:
0.80, 0.91 an additional component 'other' is used.
Author:
Fabrice Daugan

Field Summary
static Test TESTED_IS_ATTACHED_TO
          Default instance representing the test against ATTACHED_TO and TESTED.
static IsTested TESTED_IS_ME
          Default instance representing the test against ME and TESTED.
 
Constructor Summary
IsTested(TestOn on)
          Create an instance of TestedIsMe
IsTested(TestOn on, TestOn other)
          Create an instance of TestedIsMe
 
Method Summary
 boolean testCard(Ability ability, MCard tested)
          Return the result of test beetwen left and right op applied on the specified card.
 
Methods inherited from class net.sf.magicproject.test.TestCard
test
 
Methods inherited from class net.sf.magicproject.test.Test
extractTriggeredEvents, getConstraintTest, getOptimizedController, testPreemption
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TESTED_IS_ME

public static final IsTested TESTED_IS_ME
Default instance representing the test against ME and TESTED.


TESTED_IS_ATTACHED_TO

public static final Test TESTED_IS_ATTACHED_TO
Default instance representing the test against ATTACHED_TO and TESTED.

Constructor Detail

IsTested

public IsTested(TestOn on)
Create an instance of TestedIsMe

Parameters:
on - the card that would be compared to the tesed one.

IsTested

public IsTested(TestOn on,
                TestOn other)
Create an instance of TestedIsMe

Parameters:
on - the card that would be compared to the tesed one.
other - The other component to test.
Method Detail

testCard

public boolean testCard(Ability ability,
                        MCard tested)
Description copied from class: TestCard
Return the result of test beetwen left and right op applied on the specified card.

Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
tested - the tested card
Returns:
true if the specified card matches with the test to do


Copyright © 2003-2007 Magic-Project. All Rights Reserved.