package rec.simulate.reasoners;

import java.util.*;
import rec.util.*;
import rec.sys.*;
import rec.simulate.widgets.*;
import rec.simulate.widgets.wm.*;

public class SimGearTrainReasoner extends Reasoner 
{
    public Iterator getStrongerTypes()
    {
	Vector v = new Vector();
	v.addElement( "rec.simulate.widgets.WSimGearTrain" );
	return v.iterator();
    }
    
    public Iterator getWeakerTypes()
    {
	Vector v = new Vector();
	v.addElement( "rec.simulate.widgets.WSimGearTrain" );
	return v.iterator();
    }
    
    public boolean match( Surface s, Widget stronger, Widget weaker )
    {

	if ((weaker instanceof WSimGearTrain) &&
	    (stronger instanceof WSimGearTrain))
	{
	    WSimGearTrain weakGear = (WSimGearTrain) weaker;
	    WSimGearTrain strongGear = (WSimGearTrain) stronger;

	    if (strongGear.numGears() > weakGear.numGears()){
		return true;
	    }
	    else{
		return false;
	    }
	}


	return false;
    }
}
