importgreenfoot.*;// (World, Actor, GreenfootImage, Greenfoot and MouseInfo)/**
* Write a description of class snowflake here.
*
* @author (your name)
* @version (a version number or a date)
*/publicclasssnowflakeextendsActor{privatevoidmoveAndDraw(intdistance){//getWorld().getBackground().setColor(Color.GREEN);finalintX_VECTOR=(int)(getX()+distance*Math.cos(Math.toRadians(getRotation())));finalintY_VECTOR=(int)(getY()+distance*Math.sin(Math.toRadians(getRotation())));getWorld().getBackground().drawLine(getX(),getY(),X_VECTOR,Y_VECTOR);move(distance);}privatevoidsetColor(intr,intg,intb){getWorld().getBackground().setColor(newColor(r,g,b));}privatevoidbranch(intdistance){for(inta=0;a<3;a++){for(intb=0;b<3;b++){moveAndDraw(distance);moveAndDraw(-distance);turn(45);}turn(-90);moveAndDraw(-distance);turn(-45);}turn(90);moveAndDraw(distance*3);}publicvoidact(){intr=1;intg=100;intb=5;int[][]colors={{85,211,136},{197,196,126},{235,233,166},{25,135,222},{211,64,159},{159,165,106},{178,160,125},{36,192,70},{231,184,204},{63,203,219}};setColor(0,0,0);intrandSize=(int)(Math.random()*25)+5;for(inti=0;i<8;i++){branch(randSize);turn(-45);}}}