@Override
    public void keyPressed(KeyEvent e){
        if (e.getKeyCode() == KeyEvent.VK_UP) {
            palkki2.setNopeus(-2);
        } else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
            palkki2.setNopeus(2);
        }if(e.getKeyCode() == KeyEvent.VK_W){
            if(peli.getClass()==kPeli.getClass()){
                palkki1.setNopeus(-2);
            }
        }else if(e.getKeyCode() == KeyEvent.VK_S){
            if(peli.getClass()==kPeli.getClass()){
                palkki1.setNopeus(2); 
            }
        }
        
        component.repaint();
    }