Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by a ( 16 years ago )
class Mode3x3{
private int height;
Mode3x3(Graphics g){
Board board3x3 =new Board(3, g, 100,20, 2, false);
height = board3x3.height;
}
public int getHeight(){
return height;
}
}
class Board extends Thread{
private int ilosc, size, position, x, y;
private double skala;
public int height;
private Graphics g;
Board(int size, Graphics g, int x, int y, double skala, boolean boki){
g.setColor(Color.black);
this.ilosc=size;
this.skala=skala;
this.x=x;
this.y=y;
this.position=(int) (40 * this.skala);
this.g=g;
if(boki){
this.position = 0;
this.ilosc =size+2;
}
this.height =(int) (skala*size*40.5+position+30);
start();
System.out.println("Ilosc watkow:"+Thread.activeCount());
}
public void run(){
System.out.println("run ilosc:n"+this.ilosc);
for (int i=1; i<this.ilosc; ++i, this.position +=40*skala){
g.drawString("dziala!!", this.x, this.y+111);
g.fillRoundRect(this.position+this.x, 40+this.y , 3,(int) (this.skala * this.size * 40.5), 2, 2);
g.fillRoundRect(this.x, 40+position+this.y ,(int) (this.skala * this.size * 40.5), 3, 2, 2);
//draw();
}
}
}
(w głownej klasie to:)
public void paint(Graphics g){
Mode3x3 play3x3 = new Mode3x3(g);
Revise this Paste