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.
     */
    public Piano() 
    {
        super(800, 340, 1);
        
        String[] keys = {"a","s","d","f","g","h","j","k","l",";","'","\\"};
        String[] sounds = {"3c", "3d", "3e", "3f", "3g", "3a", "3b", "4c", "4d", "4e", "4f", "4g" };
        
        int count = 0;
        while(count < keys.length) { 
            addObject(new Key(keys[count], sounds[count]), count * 63 + 54, 140);
            count = count + 1;
        }
        
        /*addObject(new Key("a"), 54, 140);
        addObject(new Key("s"), 117, 140);*/
        
    }
}