import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot)
/**
* A piano that can be played with the computer keyboard.
*
* @author: M. Kolling
* @version: 0.1
*/
public class Piano extends World
{
/**
* Make the piano.
*/
String tastenliste;
tastenliste={"a","s","d","f","g","j","k"};
Stringsoundliste;
soundliste={"2a.wav","2b.wav","2c.wav","2d.wav","2e.wav","2f.wav","2g.wav"}
public Piano()
{
super(800, 340, 1);
int i;
i=0;
while(i<10)
{
Key Taste;
Taste=new Key(tastemnliste",soundliste);
addObject (Taste, i*Taste.getImage().getWidth()+50,(Taste.getImage().getHeight()))*0,5;
i= i+1;
}
}
}