import java.util.*; import java.awt.*; //public class object29 implements oo{ public class object29 extends object{ public Sound squick; public Image image2; public Image image1; public int other=-1; public object29(){ methods[0]="hit"; methods[1]="resetevent"; objnumber=29; } public void init(Global glbl){ global=glbl; if(image1==null){ image1=global.loadImage(global.Server, global.Directory+"29"+global.Extention, global.show); image2=global.loadImage(global.Server, global.Directory+"29_1"+global.Extention, global.show); squick=global.loadSound(global.Server, global.Directory+"14.au"); image=image1; } other=global.grid.next(0,0,14); } public void execute(){ if(method.compareTo("resetevent")==0)resetevent(); if(method.compareTo("hit")==0){ hit(); return; } } public void hit(){ if(other > -1){ if(global.playsound) squick.play(); if(global.grid.get(other)==14){ image=image2; global.grid.set(other,1); } else if(global.grid.get(other)==1){ image=image1; global.grid.set(other,14); } int c=other%(global.WIDTH*global.STEPP); int h=other/(global.WIDTH*global.STEPP); global.boardrow=-1; global.boardcol=-1; global.boardwidth=-1; global.boardheight=-1; global.doboard=true; } } public void resetevent(){ } }