public PlayPanel(Particle p){
        setVisible(true);
        setSize(700, 500);
        setBackground(Color.WHITE);
        this.p = p;

        addMouseListener(new MouseListener() {
            @Override
            public void mouseClicked(MouseEvent e) {
                if(!isClicked){
                    for(Rectangle rec : Rectangle.moveList){
                        if (rec.isIn(e.getX(),e.getY()) && (rec instanceof Field)){
                            isClicked = true;
                            Field.focusedField=(Field)rec;
                          //  System.out.println("WORK!");
                        }
                    }
                }else{
                    Field.focusedField.setX(e.getX());
                    Field.focusedField.setY(e.getY());
                    isClicked=false;
                   repaint();
                }
            }

            @Override
            public void mousePressed(MouseEvent e) {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void mouseReleased(MouseEvent e) {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void mouseEntered(MouseEvent e) {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            @Override
            public void mouseExited(MouseEvent e) {
                //To change body of implemented methods use File | Settings | File Templates.
            }
        });
    }