
/** extension of MyInteger to include the method winnerOf */

package wrappers;

import dataStructures.*;

public class NewMyInteger extends MyInteger
                          implements Playable
{
   // same constructor methods as MyInteger
   public ExtendedMyInteger(int theValue)
      {super(theValue);}

   public ExtendedMyInteger()
      {super();}

   /** MyInteger initialized to s */
   public ExtendedMyInteger(String s)
          throws NumberFormatException
      {super(s);}

   /** winner is smaller element */
   public boolean winnerOf(Playable thePlayer)
      {return value <= ((NewMyInteger) thePlayer).value;}
}
