All pastes #412213 Raw Edit

Miscellany

public text v1 · immutable
#412213 ·published 2007-03-27 15:51 UTC
rendered paste body
public class PisteArvausJono extends ArvausJono {
	private int pisteet;
	
    public static final int ALKUPISTEET = 10;
    public static final int LISAYS_OIKEASTA = 10;
    public static final int VAHENNYS_VAARASTA = 5;
    
    public PisteArvausJono(String mjono) {
    	super(mjono);    
    }
    
    public int kerroPisteet() {
    	return this.pisteet;
    }
    
    public boolean lopussa() {
    	if (this.pisteet < 0 || super.kaikkiLoydetty()) {
    		return true;
    	}
    	else
    		return false;
    }
    
    public boolean loytyy(char kirjain) {
    	if (this.pisteet < 0) {
    		return false;
        } else if (super.loytyy(kirjain)) {
          // OIKEIN!
          return true;
        } else {
          // VITUIKS MÄN! :D
          return false;
        }
    }
    
    


}