@Override
    public void actionPerformed(ActionEvent arg0) {
        // TODO Auto-generated method stub
        if (type == 0) {
            p.move(p.getX(), p.getY());
        }

        repaint();
    }