アットウィキロゴ

ふぉうれ

import java.awt.*;
import java.awt.event.*;

class game extends Frame {

double delta;
double[] data=new double[200];
double[] alpha=new double[200];
int num,datanumber;
int qx,m,n;
double x,nx,fx;

public static void main(String [] args) {
        game f=new game();
        f.setTitle("game");
        f.setSize(700,700);
        f.setBackground(Color.yellow);
        f.setVisible(true);
    }

game(){

num=100;
datanumber=2*num;

for (m=0;m<num;m++){
data[m]=0.01*m*m+20;
}

for (m=num;m<datanumber;m++){
data[m]=data[datanumber-m];
}


addWindowListener(new stopwin());

}

class stopwin extends WindowAdapter{
    public void windowClosing(WindowEvent we){System.exit(0);}
    }

public void paint(Graphics g){
int gx;

g.setColor(Color.blue);
for (n=1;n<num;n++){
gx=(int)data[n];
g.fillRect(100+n,600-gx,5,5);
}

g.setColor(Color.red);
for (n=1;n<num;n++){
fou sub2=new fou();
sub2.data=data;
sub2.datanumber=datanumber;
fx=sub2.makedata(n);
gx=(int)fx;
g.fillRect(100+n,600-gx,5,5);
}


}





}
最終更新:2011年08月04日 07:15