// (c) MIT 2003.  All rights reserved.

// $Id: SimPolygonReasoner.java,v 1.4 2003/03/06 00:40:41 moltmans Exp $
// Time-stamp: <2000-03-11 18:59:37 moltmans>
package rec.simulate.reasoners;



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


public class SimPolygonReasoner extends Reasoner 
{
  public SimPolygonReasoner()
  {
    super();
  }

  public Iterator getStrongerTypes()
  {
    Vector v = new Vector();

    v.addElement( "rec.simulate.widgets.WSimSquare" );

    return v.iterator();
  }

  public Iterator getWeakerTypes()
  {
    Vector v = new Vector();

    v.addElement( "rec.core.widgets.WClick" );
    v.addElement( "rec.core.widgets.WCircle" );

    return v.iterator();
  }

  public boolean match( Surface s, Widget stronger, Widget weaker )
  {
    return true;
  }


  public void reason( Surface s, Widget w )
  {
    Collection c = w.getAllChildrenAndMe();
    HashSet h = new HashSet();
    Iterator it = c.iterator();

    while( it.hasNext() ) {
      FamilyMember f = (FamilyMember)it.next();
      
      if ( f instanceof WSimCircle ) {
	//weaken( s, (Widget)f, 2.0 );
      }
      if ( f instanceof WSimRectangle ) {
	//strengthen( s, (Widget)f, 2.0 );
      }
    }    
  
  }


}



